Beispiel #1
0
 public bool UpdateRecord(mdlBricks ObjBricks)
 {
     return ObjdalBricks.UpdateRecord(ObjBricks);
 }
Beispiel #2
0
        public bool UpdateRecord(mdlBricks ObjBricks)
        {
            bool Update = false;
            try
            {
                if (con.State == ConnectionState.Open)
                {
                    con.Close();
                }
                SqlCommand cmd = new SqlCommand("stp_ERP_Bricks_Crud", con);

                cmd.Parameters.Add("@pk_Brickid", SqlDbType.VarChar, 7).Value = ObjBricks.pk_Brickid;
                cmd.Parameters.Add("@Fk_TownId", SqlDbType.VarChar, 7).Value = ObjBricks.Fk_TownId;
                cmd.Parameters.Add("@Description", SqlDbType.VarChar, 100).Value = ObjBricks.Description;
                cmd.Parameters.Add("@BrickName", SqlDbType.VarChar, 25).Value = ObjBricks.BrickName;
                cmd.Parameters.Add("@IsDeleted", SqlDbType.Bit).Value = ObjBricks.IsDeleted;
                cmd.Parameters.Add("@Adduser", SqlDbType.VarChar, 25).Value = ObjBricks.AddUser;
                cmd.Parameters.Add("@LoginComputer", SqlDbType.VarChar, 25).Value = ObjBricks.LoginComp;
                cmd.Parameters.Add("@Fk_TerritoryID", SqlDbType.VarChar, 9).Value = ObjBricks.FkTerritoryID;
                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;
        }
Beispiel #3
0
 public bool SaveRecord(mdlBricks ObjBricks)
 {
     return ObjdalBricks.SaveRecord(ObjBricks);
 }