public void UPdateGroupName(BE_Group NewUpdateBE) { SqlConnection sqlconn = new SqlConnection(ConnString); SqlCommand sqlcomm = new SqlCommand("UpdateGroup", sqlconn); sqlcomm.CommandType = CommandType.StoredProcedure; sqlcomm.Parameters.AddWithValue("@GroupID", NewUpdateBE.GroupID); sqlcomm.Parameters.AddWithValue("@GroupName", NewUpdateBE.GroupName); sqlcomm.Parameters.AddWithValue("@IsActive", NewUpdateBE.IsActive); try { sqlconn.Open(); sqlcomm.ExecuteNonQuery(); } catch (Exception ex) { MessageBox.Show(ex.Message, DataAccess.ProjectName, MessageBoxButtons.OK, MessageBoxIcon.Stop); } finally { sqlconn.Close(); sqlcomm.Dispose(); } }
public void InsertGroup(BE_Group BEObj) { SqlConnection sqlconn = new SqlConnection(ConnString); SqlCommand sqlcomm = new SqlCommand("InsertGroup", sqlconn); sqlcomm.CommandType = CommandType.StoredProcedure; this.InvestmentPosting = int.Parse(DataAccess.GetMaxNO("GroupID", "Groups").ToString()); BEObj.GroupID = this.InvestmentPosting; sqlcomm.Parameters.AddWithValue("@GroupID", BEObj.GroupID); sqlcomm.Parameters.AddWithValue("@GroupName", BEObj.GroupName); sqlcomm.Parameters.AddWithValue("@IsActive", BEObj.IsActive); try { sqlconn.Open(); sqlcomm.ExecuteNonQuery(); } catch (Exception ex) { MessageBox.Show(ex.Message, DataAccess.ProjectName, MessageBoxButtons.OK, MessageBoxIcon.Stop); } finally { sqlconn.Close(); sqlcomm.Dispose(); } }
public bool DuplicateGroup(BE_Group NewObjDuplicate) { SqlConnection sqlconn = new SqlConnection(ConnString); string qry = "Select GroupID From Groups Where GroupName like '%" + NewObjDuplicate.GroupName + "%'"; DataTable dt = new DataTable(); dt = GetDataTable(qry, sqlconn); if (dt.Rows.Count > 0) { return(true); } return(false); }
public DataTable GetGroupName(BE_Group NewBEObj) { DataTable dt = new DataTable(); try { SqlConnection sqlconn = new SqlConnection(ConnString); SqlCommand sqlcomm = new SqlCommand("GetGroupName", sqlconn); sqlcomm.CommandType = CommandType.StoredProcedure; sqlcomm.Parameters.AddWithValue("@GroupID", NewBEObj.GroupID); dt = GetDataTable(sqlcomm, sqlconn); } catch (Exception ex) { MessageBox.Show(ex.Message, DataAccess.ProjectName, MessageBoxButtons.OK, MessageBoxIcon.Stop); } return(dt); }
public void UPdateGroupName(BE_Group NewBEObj) { DAL_Group NewDALObj = new DAL_Group(); NewDALObj.UPdateGroupName(NewBEObj); }
public DataTable GetGroupName(BE_Group NewBEObj) { DAL_Group NewDalObj = new DAL_Group(); return(NewDalObj.GetGroupName(NewBEObj)); }
public bool DuplicateGroup(BE_Group NewBEObj) { DAL_Group NewDalObj = new DAL_Group(); return(NewDalObj.DuplicateGroup(NewBEObj)); }
public void InsertGroup(BE_Group NewBEObj) { DAL_Group NewDALOBj = new DAL_Group(); NewDALOBj.InsertGroup(NewBEObj); }