public DataSet BindGridView(DTO.ColorMaster Ob) { SqlCommand cmd = new SqlCommand(); DataSet ds = new DataSet(); cmd.CommandText = "sp_ColorMaster"; cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@ColorName", Ob.ColorName); cmd.Parameters.AddWithValue("@BranchId", Ob.BranchId); cmd.Parameters.AddWithValue("@Flag", 4); ds = PrjClass.GetData(cmd); return(ds); }
public string deleteColorMaster(DTO.ColorMaster Ob) { string res = string.Empty; SqlCommand cmd = new SqlCommand(); cmd.CommandText = "sp_ColorMaster"; cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@Active", Ob.Active); cmd.Parameters.AddWithValue("@ColorId", Ob.ColorID); cmd.Parameters.AddWithValue("@BranchId", Ob.BranchId); cmd.Parameters.AddWithValue("@Flag", 5); res = PrjClass.ExecuteNonQuery(cmd); return(res); }
public string SaveColorMaster(DTO.ColorMaster Ob) { ArrayList date = DAL.DALFactory.Instance.DAL_DateAndTime.getDateAndTimeAccordingToZoneTime(Ob.BranchId); string res = string.Empty; SqlCommand cmd = new SqlCommand(); cmd.CommandText = "sp_ColorMaster"; cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@ColorName", Ob.ColorName); cmd.Parameters.AddWithValue("@ColorImage", Ob.ImageName); cmd.Parameters.AddWithValue("@Active", Ob.Active); cmd.Parameters.AddWithValue("@DateCreated", date[0].ToString()); cmd.Parameters.AddWithValue("@DateModified", date[0].ToString()); cmd.Parameters.AddWithValue("@BranchId", Ob.BranchId); cmd.Parameters.AddWithValue("@Flag", 1); res = PrjClass.ExecuteNonQuery(cmd); return(res); }
protected void btnDelete_Click(object sender, EventArgs e) { string res = ""; Ob = SetValue(); Ob.Active = 0; Ob.ColorID = Int32.Parse(lblUpdateId.Text); res = BAL.BALFactory.Instance.BL_ColorMaster.deleteColorMaster(Ob); if (res == "Record Saved") { lblMsg.Text = "Record Deactivated"; btnDelete.Visible = false; BindGrid(""); RefreshForm(); imgStudentPhoto.ImageUrl = ""; } else { lblErr.Text = res; } }
public string SaveColorMaster(DTO.ColorMaster Ob) { return(DAL.DALFactory.Instance.DAL_ColorMaster.SaveColorMaster(Ob)); }
public DataSet BindGridView(DTO.ColorMaster Ob) { return(DAL.DALFactory.Instance.DAL_ColorMaster.BindGridView(Ob)); }