hi all,
i got the given error in my project , the error is like this, please do a favour for me...
The best overloaded method match for 'clsCommon.FnUpdatedAccessNo(string, string, string, string)' has some invalid arguments
Source Error:
Line 170: }
Line 171: string[] result1=new string[2];
Line 172: result1 = clsObj.FnUpdatedAccessNo(Session["User_id"], accessnumber, TextBoxDest.Text.Trim(), TextBoxRef.Text.Trim());
Line 173: GridView1.EditIndex = -1;
Line 174: lblStatus.Text = "";
my code is:
protected void BtnAllocate_Click(object sender, EventArgs e)
{
string[] result=new string [4];
string accessnumber = null;
accessnumber = "";
result = clsObj.FnCheckAccessNo();
if (result[0] == "1")
{
accessnumber = result[2];
}
else if (result[0] == "0")
{
lblStatus.Text = "";
}
string[] result1=new string[2];
result1 = clsObj.FnUpdatedAccessNo(Session["User_id"], accessnumber, TextBoxDest.Text.Trim(), TextBoxRef.Text.Trim());
GridView1.EditIndex = -1;
lblStatus.Text = "";
}
class file is:
public string[] FnUpdatedAccessNo(string Account, string AccNo, string DestNo, string DestRef)
{
string[] result = new string[2];
string[] spexec = new string[2];
string[] inputparaname = { "@Accountnumber", "@AccessNo", "@DestNo", "@name_of_diverison" };
string[] inputparavalue = { Account, AccNo, DestNo, DestRef };
string[] outputparaname = { "@result" };
spexec = fnProcessStoredProc("Update_AccessNumber", sqlconn_cmsstr, inputparaname, inputparavalue, outputparaname);
if (spexec[0] == "1" && spexec[1] == "1")
{
result[0] = "1";
result[1] = "1";
return result;
}
else if (spexec[0].ToString() == "1" && spexec[1].ToString() == "0")
{
result[0] = "0";
result[1] = "0";
return result;
}
else
{
result[0] = "0";
result[1] = "0";
return result;
}
return result;
}