Ejemplo n.º 1
0
 public bool UpdateManager(mdlFieldManager obj_mdlFieldManager)
 {
     return obj_dalFieldManager.UpdateManager(obj_mdlFieldManager);
 }
Ejemplo n.º 2
0
 public bool UpdateManager(mdlFieldManager obj_mdlFieldManager)
 {
     bool Update = false;
     try
     {
         if (con.State == ConnectionState.Open)
         {
             con.Close();
         }
         SqlCommand cmd = new SqlCommand("stp_ERP_FieldManager_CRUD", con);
         cmd.Parameters.Add("@pk_FMID", SqlDbType.VarChar, 9).Value = obj_mdlFieldManager.FM_ID;
         cmd.Parameters.Add("@Fk_GroupID", SqlDbType.VarChar, 9).Value = obj_mdlFieldManager.GroupID;
         cmd.Parameters.Add("@Fk_TeamID", SqlDbType.VarChar, 9).Value = obj_mdlFieldManager.Team_ID;
         cmd.Parameters.Add("@FM_Name", SqlDbType.VarChar, 20).Value = obj_mdlFieldManager.FMName;
         cmd.Parameters.Add("@Description", SqlDbType.VarChar, 100).Value = obj_mdlFieldManager.Description;
         cmd.Parameters.Add("@IsDiscontinue", SqlDbType.Bit).Value = obj_mdlFieldManager.IsDiscontinue;
         cmd.Parameters.Add("@AddUser", SqlDbType.VarChar, 20).Value = obj_mdlFieldManager.AddUser;
         cmd.Parameters.Add("@AddComputer", SqlDbType.VarChar, 20).Value = obj_mdlFieldManager.LoginComputer;
         cmd.Parameters.Add("@Operation", SqlDbType.VarChar, 10).Value = "Update";
         con.Open();
         cmd.CommandType = CommandType.StoredProcedure;
         cmd.ExecuteNonQuery();
         Update = true;
         if (con.State == ConnectionState.Open)
         {
             con.Close();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "ERP - Babar Medicine Company Lahore", MessageBoxButtons.OK, MessageBoxIcon.Error);
         Update = false;
         if (con.State == ConnectionState.Open)
         {
             con.Close();
         }
     }
     return Update;
 }
Ejemplo n.º 3
0
 public bool SaveManager(mdlFieldManager obj_mdlFieldManager)
 {
     return obj_dalFieldManager.SaveManager(obj_mdlFieldManager);
 }