السلام عليكم ورحمة الله وبركاته
عند استدعاء نفس الميثود فى نفس الصفحة يعطى هذه الرسالة ولم افهم معناها
Error 24 No overload for method 'AddEditCategories' takes '4' arguments
الكود :
protected void BtnAdd_Click(object sender, EventArgs e)
{
string strID = Request.QueryString["CategoryID"];
if (FileUpload1.HasFile == true && FileUpload1.PostedFile != null)
{
int _size = 10485760;// equal 9 mb
string _fileExt = System.IO.Path.GetExtension(FileUpload1.FileName);
if (_fileExt.ToLower() == ".jpg" || _fileExt.ToLower() == ".gif" || _fileExt.ToLower() == ".png" || _fileExt.ToLower() == ".bmp")
{
if (FileUpload1.PostedFile.ContentLength < _size)
{
string FileName = Path.GetFileName(FileUpload1.PostedFile.FileName);
FileUpload1.SaveAs(Server.MapPath("~/images/Products/" + FileName));
if (BtnAdd.Text.Equals("اضافة"))
{
if (DA.AddEditCategories("-1", TBCategoryName.Text, TBCategoryDetails.Text, FileName, "~/images/Products/" + FileName) > 0)
{
//Response.Redirect("NewsEditDelete.aspx");
LblMasg.Text = "تم الإضافة بنجاح";
TBCategoryName.Text = TBCategoryDetails.Text = "";
}
}
else
{
if (DA.AddEditCategories(Request.QueryString["CategoryID"], TBCategoryName.Text, TBCategoryDetails.Text, "~/images/Products/" + FileName) > 0)
{
//Response.Redirect("NewsEditDelete.aspx");
LblMasg.Text = "تم التعديل بنجاح";
}
}
}
}
}
}