Beispiel #1
0
        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();
            }
        }
Beispiel #2
0
        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();
            }
        }
Beispiel #3
0
        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);
        }
Beispiel #4
0
        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);
        }
Beispiel #5
0
        public void UPdateGroupName(BE_Group NewBEObj)
        {
            DAL_Group NewDALObj = new DAL_Group();

            NewDALObj.UPdateGroupName(NewBEObj);
        }
Beispiel #6
0
        public DataTable GetGroupName(BE_Group NewBEObj)
        {
            DAL_Group NewDalObj = new DAL_Group();

            return(NewDalObj.GetGroupName(NewBEObj));
        }
Beispiel #7
0
        public bool DuplicateGroup(BE_Group NewBEObj)
        {
            DAL_Group NewDalObj = new DAL_Group();

            return(NewDalObj.DuplicateGroup(NewBEObj));
        }
Beispiel #8
0
        public void InsertGroup(BE_Group NewBEObj)
        {
            DAL_Group NewDALOBj = new DAL_Group();

            NewDALOBj.InsertGroup(NewBEObj);
        }