Example #1
0
 protected void btnEditAccessoryCategory_Click(object sender, EventArgs e)
 {
     try
     {
         hfModeAccessoryCategory.Value = "Edit";
         ViewModel.Search searchAccessoryCategory = new ViewModel.Search();
         searchAccessoryCategory.Filter = " And tblAccessoryCategory.IDAccessoryCategory='" + hfIDAccessoryCategory.Value + "'";
         DataSet ds = BisAccessoryCategory.GetAccessoryCategoryData(searchAccessoryCategory);
         if (!ds.Null_Ds())
         {
             txtAccessoryName_En.Text = ds.ReturnDataSetField("Name_En");
             txtAccessoryName_Fa.Text = ds.ReturnDataSetField("Name_Fa");
             txtSort.Text             = ds.ReturnDataSetField("Sort");
             TreeDropDownEdit.SelectNode(ds.ReturnDataSetField("IDParent"));
             ScriptManager.RegisterClientScriptBlock(this, GetType(), "CloseModal", "$('#ModalNavigationOnAccessory').modal('hide');", true);
         }
         else
         {
             ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(), "Succsess", " bootbox.alert({message: \"<p dir='rtl' style='color:#004179;font-size:17px;'> اشکال در برقراری ارتباط با دیتابیس!</p>\",title: \"<p style='text-align:right;direction:rtl'>خطا</p>\"});", true);
         }
     }
     catch
     {
         ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(), "Succsess", " bootbox.alert({message: \"<p dir='rtl' style='color:#004179;font-size:17px;'> اشکال در برقراری ارتباط با دیتابیس!</p>\",title: \"<p style='text-align:right;direction:rtl'>خطا</p>\"});", true);
     }
 }
Example #2
0
 public void NewFieldsAccessoryAccessory()
 {
     txtAccessoryName_Fa.Text = "";
     txtAccessoryName_En.Text = "";
     txtSort.Text             = "";
     TreeDropDownEdit.SelectNode(Guid.Empty.ToString());
     hfModeAccessoryCategory.Value = "New";
     hfIDAccessoryCategory.Value   = "";
 }