15,887,683 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Meer Wajeed Ali (Top 53 by date)
Meer Wajeed Ali
18-Nov-16 8:09am
View
how do I find out what is referencing System.Web.WebPages.Razor v3.0.0.0?
In ASP.NET MVC 4, the namespace is not System.Web.WebPages.Razor, but System.Web.Razor
Meer Wajeed Ali
23-May-16 1:04am
View
Yeah got it but in the above PRn Code is 19 lines respectively, in the 2,3,9,10,11,12,13,14 and 16 line I coated text between "" (double quotes), what my actual requirement is within the "" the text will be change remaining code is static.
Below is my method....
private void button1_Click(object sender, EventArgs e)
{
string[] lines;
var list = new List<string>();
var fileStream = new FileStream(@"c:\srctxt1.txt", FileMode.Open, FileAccess.Read);
using (var streamReader = new StreamReader(fileStream, Encoding.UTF8))
{
string line="";
while ((line = streamReader.ReadLine()) != null)
{
list.Add(line);
}
}
lines = list.ToArray();
}
Meer Wajeed Ali
14-May-16 5:16am
View
ODFK"*"
FS"*"
q856
Q140,34+0
S3
D12
ZT
A670,165,2,2,1,1,N,"K-22 S-2"
A670,140,2,2,1,1,N,""
B670,65,2,3,1,2,32,N,"5050001104"
A670,26,2,3,1,1,N,"5050001104"
A670,110,2,3,1,1,N,"112.CZ ODMB CLR"
A670,90,2,2,2,2,N,"12.000"
FE
FR"*"
?
P1
N
The above is the format of to generate the barcode, here is my requirement is to generate this file.
Meer Wajeed Ali
10-May-16 7:10am
View
ok thanks, please give some referneces to work on it.
Meer Wajeed Ali
10-May-16 6:40am
View
A PRN file is a special type of file which contains instructions for a printer, it tells the printer what to print on the page and where as well as which paper tray to use, what the paper size is and a number of other controls.
Meer Wajeed Ali
2-Feb-16 3:58am
View
iObject = iReader.SingleOrDefault<model.payrollempsalarysetup>();
Meer Wajeed Ali
29-Oct-15 10:27am
View
I already tried with break but it jumped to finally block. please sugest where exactly I have to write and thanks..
Meer Wajeed Ali
19-Aug-15 7:58am
View
Ajax calender extender also not working inside dialog box.
Meer Wajeed Ali
5-Aug-15 5:43am
View
Hi I updated my thread kindly check out and let me some possibilities...thanks
public static DateTime FormatDate(string date)
{
try
{
IFormatProvider provider = new System.Globalization.CultureInfo("en-GB");
return Convert.ToDateTime(date, provider);
}
catch
{
string format = "ddd dd MMM h:mm tt yyyy";
return DateTime.ParseExact(date, format, System.Globalization.CultureInfo.InvariantCulture);
}
}
Meer Wajeed Ali
30-Jul-15 7:39am
View
sorry!, I was in urgency not typed properly...now got
Meer Wajeed Ali
28-Jul-15 3:02am
View
Deleted
Please let me kno
Meer Wajeed Ali
28-Jul-15 2:44am
View
this one is my controllers' class method
public Model.Leave_Request Get(int recordId)
{
Model.Leave_Request iObject = null;
DBManager dbManager = null;
IDataReader iReader = null;
string sql = string.Empty;
try
{
sql = "SELECT LEAVE_REQUEST_ID,EMP_NO,FROM_DATE,TO_DATE,REQUEST_TYPE_ID,APPROVAL_DATE,IS_APPROVED FROM dbo.LEAVE_REQUEST WITH(NOLOCK) WHERE IS_DELETED=0 AND LEAVE_REQUEST_ID= " + recordId;
switch (Constants.DBEngine)
{
case (int)DataProvider.SqlServer:
dbManager = new DBManager();
dbManager.ProviderType = DataProvider.SqlServer;
dbManager.ConnectionString = Constants.ConnectionString;
break;
}
dbManager.Open();
dbManager.Command.CommandTimeout = Constants.CommandTimeOut;
dbManager.Command.CommandText = sql;
dbManager.Command.Connection = dbManager.Connection;
iReader = dbManager.Command.ExecuteReader();
iObject = iReader.SingleOrDefault<model.leave_request>();
}
catch (Exception Exp)
{
throw Exp;
}
finally
{
if (iReader != null)
iReader.Close();
if (dbManager != null)
dbManager.Close();
}
return iObject;
}
Meer Wajeed Ali
28-Jul-15 1:52am
View
my Get method accept only integer
public HR.Dal.Model.Leave_Request Get(int recordId);
Meer Wajeed Ali
21-Jul-15 4:20am
View
thnx
Meer Wajeed Ali
30-Jun-15 5:19am
View
saves my day, thank u very much.
Meer Wajeed Ali
22-Jun-15 2:33am
View
I didn't found the solution. My application built on windows forms as your suggest that belong to Web application.
Meer Wajeed Ali
22-Jun-15 2:13am
View
thanks for the suggestion but some one told me with the help sql server RTM we can integrate with .Net application
Meer Wajeed Ali
22-Jun-15 1:18am
View
Actually I developed desktop application using windows forms and backend as sql server. when I am installing (application)it into other machines along with I have to install sql server its very stuff to me and time consuming. My moto is when I click on setup file along with application Sql server also run with DLL.
Meer Wajeed Ali
18-Jun-15 1:12am
View
thanks @Maciej Los
Meer Wajeed Ali
18-Jun-15 1:11am
View
I apologize for not intimate about my issue, got the solution, thank alot.
Meer Wajeed Ali
16-Jun-15 4:34am
View
Hi Ralf already I checked with last thread but yet I didn't get solution that why I re posted.
Meer Wajeed Ali
14-Jun-15 2:59am
View
I am getting an error while installing the sql server. Error "Prior Visual studio 2010 instances required update" failed. this system has installed vs2010 that requires an updates.
Meer Wajeed Ali
14-Jun-15 2:49am
View
Yes it works for me...thanx
Meer Wajeed Ali
10-Jun-15 4:10am
View
In textbox Payee2
Meer Wajeed Ali
9-Jun-15 8:45am
View
thx for the support. But didn't getting values into txtpayee2. I want to assign only 10 characters from combobox into txtpayagain and remaining text assign into txtpayee2.
Meer Wajeed Ali
9-Jun-15 6:05am
View
Below is the method that I am trying, what is my motto is combobox selected text display into two textboxes I,e in first textbox will print only 10 characters remaining display into 2textbox.
Public Sub Addpayee2()
Try
Dim payee2 As String = ""
payee2 = cboAccounts.Text.ToString()
Dim g As Graphics = cboAccounts.CreateGraphics
Dim payee2word As String, oneLine As String
Dim test As String = "", test1 As String = ""
Dim p2words() As String
If g.MeasureString(payee2, txtPayAgainst.Font).Width >= txtPayAgainst.Width Then
oneLine = payee2
p2words = oneLine.Split(" ")
For Each word In p2words
test = test & word
If g.MeasureString(test, txtPayAgainst.Font).Width >= txtPayAgainst.Width Then
txtPayAgainst.Text = test1
GoTo l1
Else
test = test & " "
test1 = test
End If
Next
l1: txtPayAgainst.Text = test1
txtpayee2.Text = payee2.Substring(test1.Length)
Else
txtPayAgainst.Text = payee2
txtpayee2.Text = ""
End If
Catch ex As Exception
MsgBox(ex.Message, , "Cheque Print")
End Try
End Sub
Meer Wajeed Ali
9-May-15 2:40am
View
I didn't got u. can u elaborate
Meer Wajeed Ali
7-May-15 8:08am
View
Actually I used print report dialog and print document but when I take print for this form the text on the form is stretched its not looking good.
Meer Wajeed Ali
7-May-15 7:49am
View
Yes this my code.
Dim Bmp As Bitmap
Public Enum PrintPageSettings
Landscape
Portrait
End Enum
Dim scaleX As Integer = 0
Private Sub PrintCheque()
Try
Lblamt.Visible = False
LblDate.Visible = False
LblWords.Visible = False
LblPayee.Visible = False
lblRef.Visible = False
pnlPreview.BorderStyle = BorderStyle.None
'If TxtChqDate.Text <> "" Then TxtChqDate.Text = Format(TxtChqDate.Text, DateFormats)
TakeScreenshot(Bmp, pnlPreview)
PrintDocument1.PrinterSettings.PrinterName = PrintName
Pic = New PictureBox
If PO = "Landscape" Then
PrintDocument1.PrinterSettings.DefaultPageSettings.Landscape = True
Bmp.RotateFlip(RotateFlipType.Rotate90FlipNone)
Pic.Image = Bmp
scaleX = 0
ElseIf PO = "Portrait" Then
PrintDocument1.PrinterSettings.DefaultPageSettings.Landscape = False
Pic.Image = Bmp
scaleX = 0
ElseIf PO = "Landscape Center" Then
PrintDocument1.PrinterSettings.DefaultPageSettings.Landscape = True
Bmp.RotateFlip(RotateFlipType.Rotate90FlipNone)
Pic.Image = Bmp
scaleX = (Pic.Image.Width) / 2
ElseIf PO = "Ex-Landscape Center" Then
PrintDocument1.PrinterSettings.DefaultPageSettings.Landscape = True
Bmp.RotateFlip(RotateFlipType.Rotate270FlipNone)
Pic.Image = Bmp
scaleX = (Pic.Image.Width) / 2
End If
PrintDocument1.Print()
'PrintPreviewDialog1.Document = PrintDocument1
'PrintPreviewDialog1.ShowDialog()
Lblamt.Visible = True
LblDate.Visible = True
LblWords.Visible = True
LblPayee.Visible = True
lblRef.Visible = True
MsgBox("Cheque is Printed Successfully!")
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Private Sub PrintDocument1_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
Dim rect As Rectangle = New Rectangle(New Point(0, 0), Bmp.Size) ' get the size of the image
e.Graphics.InterpolationMode = Drawing2D.InterpolationMode.HighQualityBicubic
e.Graphics.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias
e.Graphics.DrawImage(Pic.Image, scaleX, 0) 'Draw Image
End Sub
Dim Pic As PictureBox
Public Sub TakeScreenshot(ByRef bmpImage As Bitmap, pnlPrint As Panel)
Dim form As Form = pnlPrint.FindForm()
If form Is Nothing Then
Throw New ArgumentException(Nothing, "panel")
End If
' remember form position
Dim w As Integer = form.Width
Dim h As Integer = form.Height
Dim l As Integer = form.Left
Dim t As Integer = form.Top
' get panel virtual size
Dim display As Rectangle = pnlPrint.DisplayRectangle
' get panel position relative to parent form
Dim panelLocation As Drawing.Point = pnlPrint.PointToScreen(pnlPrint.Location)
Dim panelPosition As New Size(panelLocation.X - form.Location.X, panelLocation.Y - form.Location.Y)
' resize form and move it outside the screen
Dim neededWidth As Integer = panelPosition.Width + display.Width
Dim neededHeight As Integer = panelPosition.Height + display.Height
form.SetBounds(0, -neededHeight, neededWidth, neededHeight, BoundsSpecified.All)
' resize panel (useless if panel has a dock)
Dim pw As Integer = pnlPrint.Width
Dim ph As Integer = pnlPrint.Height
pnlPrint.SetBounds(0, 0, display.Width, display.Height, BoundsSpecified.Size)
' render the panel on a bitmap
Try
bmpImage
Meer Wajeed Ali
7-May-15 7:26am
View
I didn't used Crystal report. that is printing with Print Dialog control and Print docuemnt
Meer Wajeed Ali
7-May-15 7:12am
View
I updated my Question, can u suggest Asap..
Meer Wajeed Ali
28-Apr-15 7:24am
View
Thanx...
Meer Wajeed Ali
28-Apr-15 6:54am
View
When I am filling I,e da.Fill(ds); I checked there are data into dataset object
Meer Wajeed Ali
28-Apr-15 6:48am
View
Yes. after compiling this line jumping out of try block
Meer Wajeed Ali
28-Apr-15 6:41am
View
Sorry that is line no 13.
Meer Wajeed Ali
28-Apr-15 6:32am
View
still getting same exception..
Meer Wajeed Ali
22-Apr-15 10:29am
View
excellent man...
Meer Wajeed Ali
21-Apr-15 9:47am
View
thanks Giri, could you check out my last one comment with code I,e stored procedure.just check and reply
Meer Wajeed Ali
21-Apr-15 9:37am
View
Deleted
And this is my data access class method. I used stored procedure for this.
public string Insert_PyLoanSettings(BELPayrollsettings objbel)
{
string ccode = "mgr";
SqlConnection con = new SqlConnection(Constring);
SqlCommand cmd = new SqlCommand("sp_UpdPayset", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@flag", 1);
cmd.Parameters.AddWithValue("@myear", objbel.Myear);
cmd.Parameters.AddWithValue("@totalDays", objbel.TotalDays);
cmd.Parameters.AddWithValue("@otHours", objbel.OtHours);
cmd.Parameters.AddWithValue("@notRate", objbel.NotRate);
cmd.Parameters.AddWithValue("@commitedOTHrs", objbel.CommitedOTHrs);
cmd.Parameters.AddWithValue("@hotrate", objbel.HotRate);
cmd.Parameters.AddWithValue("@sotrate", objbel.Sotrate);
cmd.Parameters.AddWithValue("@intMode", objbel.IntMode);
cmd.Parameters.AddWithValue("@intOption", objbel.IntOption);
cmd.Parameters.AddWithValue("@acStaffCurrent", objbel.AcStaffCurrent);
cmd.Parameters.AddWithValue("@acLeavePay", objbel.AcLeavePay);
cmd.Parameters.AddWithValue("@acGratuityPay", objbel.AcGratuityPay);
cmd.Parameters.AddWithValue("@acGratuityExp", objbel.AcGratuityExp);
cmd.Parameters.AddWithValue("@acSalPayable", objbel.AcSalPayable);
cmd.Parameters.AddWithValue("@acticketFair", objbel.AcTicketFair);
cmd.Parameters.AddWithValue("@acBasic", objbel.AcBasic);
cmd.Parameters.AddWithValue("@acCommOT", objbel.AcCommOT);
cmd.Parameters.AddWithValue("@acTel", objbel.AcTel);
cmd.Parameters.AddWithValue("@aacCommGuar", objbel.AcCommGuar);
cmd.Parameters.AddWithValue("@acFoodAlw", objbel.AcFoodAlw);
cmd.Parameters.AddWithValue("@acTranAlw", objbel.AcTranAlw);
cmd.Parameters.AddWithValue("@acHouseAlw", objbel.AcHouseAlw);
cmd.Parameters.AddWithValue("@acOthAlw", objbel.AcOtherAlw);
cmd.Parameters.AddWithValue("@acOTAlw", objbel.AcOverTimeAlw);
cmd.Parameters.AddWithValue("@acVacPay", objbel.AcVacPay);
cmd.Parameters.AddWithValue("@acSLPay", objbel.AcSLPay);
cmd.Parameters.AddWithValue("@acBonus", objbel.AcBonus);
cmd.Parameters.AddWithValue("@laonEntitleAfter", objbel.LaonEntitleAfter);
cmd.Parameters.AddWithValue("@maxLoanEntitle", objbel.MaxLoanEntitle);
cmd.Parameters.AddWithValue("@NotAnyLoanEntitileUntil", objbel.NotAnyLoanEntitileUntil);
cmd.Parameters.AddWithValue("@minServiceforAL", objbel.MinServiceforAL);
cmd.Parameters.AddWithValue("@ConsiderALasService", objbel.ConsiderALasService);
cmd.Parameters.AddWithValue("@adjustAccrudeLeave", objbel.AdjustAccrudeLeave);
cmd.Parameters.AddWithValue("@minALPeriod", objbel.MinALPeriod);
cmd.Parameters.AddWithValue("@aLNotCompleted", objbel.ALNotCompleted);
cmd.Parameters.AddWithValue("@aLCompleted", objbel.ALCompleted);
cmd.Parameters.AddWithValue("@ALAutoUpdate", objbel.IntALAutoUpdate);
cmd.Parameters.AddWithValue("@optionLeaveSalary", objbel.OptionLeaveSalary);
cmd.Parameters.AddWithValue("@optionEncashment", objbel.OptionEncashment);
cmd.Parameters.AddWithValue("@excludeHouseAlw", objbel.ExcludeHouseAlw);
cmd.Parameters.AddWithValue("@sLNotCompletedProb", objbel.SLNotCompletedProb);
cmd.Parameters.AddWithValue("@sLFullPay", objbel.SLFullPay);
cmd.Parameters.AddWithValue("@sLHalfPa", objbel.SLHalfPay);
cmd.Parameters.AddWithValue("@accidentFullPay", objbel.AccidentFullPay);
cmd.Parameters.AddWithValue("@accidentHalfPay", objbel.AccidentHalfPay);
cmd.Parameters.AddWithValue("@maxPersonalLAllowed", objbel.MaxPe
Meer Wajeed Ali
13-Apr-15 4:47am
View
Mean I want to know how to write sp for multiple tables, I just want concept and syntaxes..
Meer Wajeed Ali
13-Apr-15 2:48am
View
جزاك اللهُ خيراً
Meer Wajeed Ali
13-Apr-15 2:35am
View
thanks for valuable suggestion...Brisk
Meer Wajeed Ali
13-Apr-15 2:28am
View
Thanks for the suggestion.
Meer Wajeed Ali
12-Apr-15 7:21am
View
Deleted
Ok, its alright next time I will take care
Meer Wajeed Ali
7-Apr-15 8:56am
View
Thank you very much works for me, as I am In mid level of this .Net technology, It is bit of hard to ask exact questions. Hovwever thanks again.
Meer Wajeed Ali
7-Apr-15 8:45am
View
not at all, I want Company name on top like page heading then Table columns like bold in excel sheet
Meer Wajeed Ali
7-Apr-15 8:39am
View
Yes, I able to display but I want column headings will be there in Excel sheet
Meer Wajeed Ali
7-Apr-15 0:20am
View
Actually this is written by my ex colleague, so it is hard me to solve where I have debug.
Meer Wajeed Ali
6-Apr-15 10:09am
View
Thanx I solved this one...Happy coding
Meer Wajeed Ali
6-Apr-15 9:34am
View
Deleted
Instead point outing refer what you know...thanx
Meer Wajeed Ali
6-Apr-15 8:37am
View
This one is windows app, kindly suggest me asap...
Meer Wajeed Ali
6-Apr-15 8:35am
View
When I run, radio buttons those have to check according to gender, and this is windows forms app
Meer Wajeed Ali
6-Apr-15 7:48am
View
In dataset I am having gender, at the time assigning into gender, if column value is M, select radio button Male or else female
Show More