Exemple #1
0
 private void updatelogic()
 {
     try
     {
         if (hd.Value != "true")
         {
             lblcheckDoubleError.Text = String.Empty;
             int godown_id = Convert.ToInt32(ViewState["godown_id"]);
             context.sp_UpdateGodown(companyId, branchId, godown_id, txtGodownName.Text, txtGodownAddress.Text, txtContactNo.Text, txtContactPerson.Text, Convert.ToString(Session["UserID"]), DateTime.Today);
             btnUpdate.Visible = false;
             btnSave.Visible   = true;
             clr();
             divalert.Visible = true;
             lblAlert.Text    = "Godown Updated Successfully";
             loadDataTable();
         }
         else
         {
             divalert.Visible = false;
             lblcheckDoubleError.ForeColor = System.Drawing.Color.Red;
             lblcheckDoubleError.Text      = "This Godown name already Exists";
             return;
         }
     }
     catch (Exception ex)
     {
         ErrorLog.saveerror(ex);
         //Do Logging
     }
 }