Exemplo n.º 1
0
        public bool InsertActivity(ProjectManagementBLL objProjectManagementBLL, ActivityProperties propActivities)
        {
            bool isInsert = false;

            try
            {
                using (SqlCommand sqlComm = new SqlCommand("proc_InsertActivity"))
                {
                    sqlComm.CommandType = CommandType.StoredProcedure;
                    sqlComm.Parameters.AddWithValue("@UserID", propActivities.UserID);
                    sqlComm.Parameters.AddWithValue("@ActivityName", propActivities.ActivityName);
                    sqlComm.Parameters.AddWithValue("@Description", propActivities.Description);
                    sqlComm.Parameters.AddWithValue("@ProjectID", propActivities.ProjectID);
                    sqlComm.Parameters.AddWithValue("@IsInScope", propActivities.IsInScope);
                    sqlComm.Parameters.AddWithValue("@ActivityTypeID", propActivities.ActivityTypeID);
                    sqlComm.Parameters.AddWithValue("@StartDate", propActivities.StartDate);
                    sqlComm.Parameters.AddWithValue("@EndDate", propActivities.EndDate);
                    objProjectManagementBLL.GetData(sqlComm);
                    isInsert = true;
                }
            }
            catch (Exception ex)
            {
                isInsert = false;
                throw new Exception(string.Format("Error occured while insert activity : {0}", ex.Message), ex);
            }
            return(isInsert);
        }
Exemplo n.º 2
0
        public DataTable GetAllActivityTypes(ProjectManagementBLL objProjectManagementBLL)
        {
            DataTable dtRecord = new DataTable();

            try
            {
                using (SqlCommand sqlComm = new SqlCommand("proc_GetAllActivityTypes"))
                {
                    sqlComm.CommandType = CommandType.StoredProcedure;
                    dtRecord            = objProjectManagementBLL.GetData(sqlComm);
                }
            }
            catch (Exception ex)
            {
                throw new Exception(string.Format("Error occured while getting All Activity Types : {0}", ex.Message), ex);
            }
            return(dtRecord);
        }
Exemplo n.º 3
0
        public DataTable AuthenticateEmail(ProjectManagementBLL objProjectManagementBLL, string Email)
        {
            DataTable dtRecord = new DataTable();

            try
            {
                using (SqlCommand sqlComm = new SqlCommand("proc_AuthenticateEmail"))
                {
                    sqlComm.CommandType = CommandType.StoredProcedure;
                    sqlComm.Parameters.AddWithValue("@Email", Email);
                    dtRecord = objProjectManagementBLL.GetData(sqlComm);
                }
            }
            catch (Exception ex)
            {
                throw new Exception(string.Format("Error occured while Authenticate Email : {0}", ex.Message), ex);
            }
            return(dtRecord);
        }
Exemplo n.º 4
0
        public DataTable GetLogin(ProjectManagementBLL objProjectManagementBLL, APICredentialsBLL credentials)
        {
            DataTable dtRecord = new DataTable();

            try
            {
                using (SqlCommand sqlComm = new SqlCommand("proc_GetLogin"))
                {
                    sqlComm.CommandType = CommandType.StoredProcedure;
                    sqlComm.Parameters.AddWithValue("@Email", credentials.UserName);
                    sqlComm.Parameters.AddWithValue("@Password", credentials.Password);
                    dtRecord = objProjectManagementBLL.GetData(sqlComm);
                }
            }
            catch (Exception ex)
            {
                throw new Exception(string.Format("Error occured while Login : {0}", ex.Message), ex);
            }
            return(dtRecord);
        }
Exemplo n.º 5
0
        public bool UpdateNextDayActivity(ProjectManagementBLL objProjectManagementBLL, int UserID, string NextDayActivity)
        {
            bool isUpdate = false;

            try
            {
                using (SqlCommand sqlComm = new SqlCommand("proc_UpdateNextDayActivity"))
                {
                    sqlComm.CommandType = CommandType.StoredProcedure;
                    sqlComm.Parameters.AddWithValue("@UserID", UserID);
                    sqlComm.Parameters.AddWithValue("@NextDayActivity", NextDayActivity);
                    objProjectManagementBLL.GetData(sqlComm);
                    isUpdate = true;
                }
            }
            catch (Exception ex)
            {
                isUpdate = false;
                throw new Exception(string.Format("Error occured while update next day activity : {0}", ex.Message), ex);
            }
            return(isUpdate);
        }