public bool UpdateRecord(mdlSubBricks ObjSubBricks) { return ObjdalSubBricks.UpdateRecord(ObjSubBricks); }
public bool UpdateRecord(mdlSubBricks ObjSubBricks) { bool Update = false; try { if (con.State == ConnectionState.Open) { con.Close(); } SqlCommand cmd = new SqlCommand("stp_ERP_SubBricks_Crud", con); cmd.Parameters.Add("@pk_SubBrickid", SqlDbType.VarChar, 7).Value = ObjSubBricks.pk_SubBrickid; cmd.Parameters.Add("@Fk_Brickid", SqlDbType.VarChar, 7).Value = ObjSubBricks.Fk_Brickid; cmd.Parameters.Add("@Description", SqlDbType.VarChar, 100).Value = ObjSubBricks.Description; cmd.Parameters.Add("@IsDeleted", SqlDbType.Bit).Value = ObjSubBricks.IsDeleted; cmd.Parameters.Add("@SubBrickName", SqlDbType.VarChar, 25).Value = ObjSubBricks.SubBrickName; cmd.Parameters.Add("@Adduser", SqlDbType.VarChar, 25).Value = ObjSubBricks.AddUser; cmd.Parameters.Add("@LoginComputer", SqlDbType.VarChar, 25).Value = ObjSubBricks.LoginComp; cmd.Parameters.Add("@Operation", SqlDbType.VarChar, 7).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; }
public bool SaveRecord(mdlSubBricks ObjSubBricks) { return ObjdalSubBricks.SaveRecord(ObjSubBricks); }