Ejemplo n.º 1
0
        /// <summary>
        /// New DSR Submission
        /// </summary>
        /// <param name="objRequirement"></param>
        /// <returns></returns>
        public bool insertDSR(Task objRequirement)
        {
            bool blResult = false;

            try
            {
                IDbDataParameter[] arrParameter = new IDbDataParameter[] {
                    DB_UTILITY.CreateParameter("@ixml", DbType.Xml, ParameterDirection.Input, objRequirement.strXMLData),
                    DB_UTILITY.CreateParameter("@iUserCode", DbType.Int32, ParameterDirection.Input, objRequirement.CreatedByCode)
                };
                _dsResultSet = CommonUtility.DB_UTILITY.RunSP("usp_insertDSR", arrParameter);

                if (ValidateResultSet(_dsResultSet))
                {
                    if (Convert.ToInt32(_dsResultSet.Tables[0].Rows[0]["RESULT"]) == 1)
                    {
                        blResult = true;
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(blResult);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// New Requirement
        /// Name:Ravi Venkatesh Maddela
        /// Date:12-06-2017
        /// </summary>
        /// <param name="objRequirement"></param>
        /// <returns></returns>
        public bool NewTasks(Task objRequirement)
        {
            bool blResult = false;
            try
            {
                IDbDataParameter[] arrParameter = new IDbDataParameter[]{
                                 DB_UTILITY.CreateParameter("@iUserCode", DbType.Int16, ParameterDirection.Input, objRequirement.CreatedByCode ),
                                  DB_UTILITY.CreateParameter("@iTitle", DbType.String, ParameterDirection.Input, objRequirement.Title),
                                  DB_UTILITY.CreateParameter("@iDescription", DbType.String, ParameterDirection.Input, objRequirement.Description),
                                  DB_UTILITY.CreateParameter("@iType", DbType.Int16, ParameterDirection.Input, objRequirement.Type),
                                  DB_UTILITY.CreateParameter("@iNoOfEfforts", DbType.Int16, ParameterDirection.Input, objRequirement.EstimatedEfforts),
                                  DB_UTILITY.CreateParameter("@iProjectName",DbType.String,ParameterDirection.Input,objRequirement.ProjectName),
                                  DB_UTILITY.CreateParameter("@iSmokeTestStatus",DbType.Int16,ParameterDirection.Input,objRequirement.SmokeTestStatus)
                };
                _dsResultSet = CommonUtility.DB_UTILITY.RunSP("usp_insertRequirement", arrParameter);

                if (ValidateResultSet(_dsResultSet))
                {
                    if(Convert.ToInt32(_dsResultSet.Tables[0].Rows[0]["RESULT"]) == 1)
                    {
                        blResult = true;
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return blResult;
        }
Ejemplo n.º 3
0
        public bool ResetPassword(User objUser)
        {
            bool blResult = false;

            try
            {
                IDbDataParameter[] arrParameter = new IDbDataParameter[] {
                    DB_UTILITY.CreateParameter("@iUserMailID", DbType.String, ParameterDirection.Input, objUser.OfficialMailID),
                    DB_UTILITY.CreateParameter("@iNewPassword", DbType.String, ParameterDirection.Input, objUser.Password),
                };

                _dsResultSet = CommonUtility.DB_UTILITY.RunSP("usp_updateResetPassword", arrParameter);

                if (ValidateResultSet(_dsResultSet))
                {
                    if (Convert.ToInt16(_dsResultSet.Tables[0].Rows[0]["RESULT"]) == 1)
                    {
                        blResult = true;
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(blResult);
        }
Ejemplo n.º 4
0
        public List <string> autoGetUserMailID(string strPreKey)
        {
            List <string> lstMailID = new List <string>();

            try
            {
                IDbDataParameter[] arrParameter = new IDbDataParameter[] {
                    DB_UTILITY.CreateParameter("@iOfficialMailID", DbType.String, ParameterDirection.Input, strPreKey)
                };

                _dsResultSet = CommonUtility.DB_UTILITY.RunSP("usp_auto_fetchUserData", arrParameter);

                if (ValidateResultSet(_dsResultSet))
                {
                    lstUser   = OBJECT_UTILITY.GetConvertCollection <User>(_dsResultSet.Tables[0]);
                    lstMailID = lstUser.Select(m => m.OfficialMailID).ToList <string>();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(lstMailID);
        }
Ejemplo n.º 5
0
        public bool CreateCategory(Category category)
        {
            bool result = false;

            try
            {
                IDbDataParameter[] arrParameter = new IDbDataParameter[] {
                    DB_UTILITY.CreateParameter("@iTitle", DbType.String, ParameterDirection.Input, category.Title),
                    DB_UTILITY.CreateParameter("@iDescription", DbType.String, ParameterDirection.Input, category.Details),
                    DB_UTILITY.CreateParameter("@iBannerImage", DbType.String, ParameterDirection.Input, category.HomeImage == null ? "" : category.HomeImage),
                    DB_UTILITY.CreateParameter("@iBannerImageAccess", DbType.String, ParameterDirection.Input, category.HomeImageAccess),
                    DB_UTILITY.CreateParameter("@iHomePageAccess", DbType.String, ParameterDirection.Input, category.HomePageAccess),
                    DB_UTILITY.CreateParameter("@iStatus", DbType.String, ParameterDirection.Input, "1")
                };
                dsResultSet = DB_UTILITY.RunSP("USP_INSERTTBL_CATEGORY", arrParameter);
                if (ValidateResultSet(dsResultSet))
                {
                    result = Convert.ToBoolean(dsResultSet.Tables[0].Rows[0][0]);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(result);
        }
Ejemplo n.º 6
0
        /// <summary>
       /// Mapping user to task
       /// </summary>
       /// <param name="strUserCode"></param>
       /// <param name="strTaskID"></param>
       /// <param name="iNoOfEfforts"></param>
        public bool MapTaskToUser(string strUserOfficialMail, int strTaskID, int iNoOfEfforts)
        {
            bool blResult = false;
            try
            {
                IDbDataParameter[] arrParameter = new IDbDataParameter[]{
                                DB_UTILITY.CreateParameter("@iUserOfficialMailID", DbType.String, ParameterDirection.Input, strUserOfficialMail ),
                                DB_UTILITY.CreateParameter("@iTaskID", DbType.Int32, ParameterDirection.Input, strTaskID ),
                                DB_UTILITY.CreateParameter("@iEstimatedEfforts", DbType.Int32, ParameterDirection.Input, iNoOfEfforts )
                };

                _dsResultSet = CommonUtility.DB_UTILITY.RunSP("usp_insertMapUserWithTask", arrParameter);

                if (ValidateResultSet(_dsResultSet))
                {
                    if (Convert.ToInt32(_dsResultSet.Tables[0].Rows[0]["RESULT"]) == 1)
                    {
                        blResult = true;
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return blResult;
        }
Ejemplo n.º 7
0
        public string updateNotificationData(int iUserCode)
        {
            try
            {
                IDbDataParameter[] arrParameter = new IDbDataParameter[] {
                    DB_UTILITY.CreateParameter("@ic_NotificationSNo", DbType.Int32, ParameterDirection.Input, iUserCode)
                };

                _dsResultSet = CommonUtility.DB_UTILITY.RunSP("usp_updateNotifications", arrParameter);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return("successs");
        }
Ejemplo n.º 8
0
 /// <summary>
 /// New DSR Submission
 /// </summary>
 /// <param name="objRequirement"></param>
 /// <returns></returns>
 public void insertDSR(string strName, string strEMail, string strContactNo, string strMessage)
 {
     try
     {
         IDbDataParameter[] arrParameter = new IDbDataParameter[] {
             DB_UTILITY.CreateParameter("@iName", DbType.String, ParameterDirection.Input, strName),
             DB_UTILITY.CreateParameter("@iContactNo", DbType.String, ParameterDirection.Input, strContactNo),
             DB_UTILITY.CreateParameter("@iMailId", DbType.String, ParameterDirection.Input, strEMail),
             DB_UTILITY.CreateParameter("@iMessage", DbType.String, ParameterDirection.Input, strMessage)
         };
         _dsResultSet = CommonUtility.DB_UTILITY.RunSP("usp_insertDotnetDrive", arrParameter);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 9
0
        /// <summary>
        /// Task Details
        /// Name:Ravi Venkatesh Maddela
        /// Date:22-06-2017
        /// </summary>
        /// <param name="objTasks"></param>
        /// <returns></returns>
        public Task GetTaskDetails(Task objTasks)
        {
            try
            {
                IDbDataParameter[] arrParameter = new IDbDataParameter[]{
                                DB_UTILITY.CreateParameter("@iTaskId", DbType.Int16, ParameterDirection.Input, objTasks.TaskId )                              
                };

                _dsResultSet = CommonUtility.DB_UTILITY.RunSP("usp_fetchTaskDetails", arrParameter);

                if (ValidateResultSet(_dsResultSet))
                {
                    _beRequirement = OBJECT_UTILITY.GetConvert<Task>(_dsResultSet.Tables[0]);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return _beRequirement;
        }
Ejemplo n.º 10
0
 /// <summary>
 /// Description :Verify User Login
 /// Name:Sruthi A
 /// </summary>
 public Users VerifyUserLogin(string UserMailID, string Password)
 {
     _users = new Users();
     try
     {
         IDbDataParameter[] arrParameter = new IDbDataParameter[] {
             DB_UTILITY.CreateParameter("@iMailId", DbType.String, ParameterDirection.Input, UserMailID),
             DB_UTILITY.CreateParameter("@iPassword", DbType.String, ParameterDirection.Input, Password)
         };
         dtuser = DB_UTILITY.RunSP("USP_FETCH_USERSLOGIN", arrParameter);
         if (ValidateResultSet(dtuser))
         {
             _users = OBJECT_UTILITY.GetConvert <Users>(dtuser.Tables[0]);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return(_users);
 }
Ejemplo n.º 11
0
        //getting notification data
        public List <Notification> getNotificationData(int iUserCode)
        {
            try
            {
                IDbDataParameter[] arrParameter = new IDbDataParameter[] {
                    DB_UTILITY.CreateParameter("@iUserCode", DbType.Int16, ParameterDirection.Input, iUserCode)
                };

                _dsResultSet = CommonUtility.DB_UTILITY.RunSP("usp_fetchNotifications", arrParameter);

                if (ValidateResultSet(_dsResultSet))
                {
                    lstNotification = OBJECT_UTILITY.GetConvertCollection <Notification>(_dsResultSet.Tables[0]);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(lstNotification);
        }
Ejemplo n.º 12
0
        public bool CreateHostel(Hostel Hostel)
        {
            bool result = false;

            try
            {
                IDbDataParameter[] arrParameter = new IDbDataParameter[] {
                    DB_UTILITY.CreateParameter("@iTitle", DbType.String, ParameterDirection.Input, Hostel.Title),
                    DB_UTILITY.CreateParameter("@iDescription", DbType.String, ParameterDirection.Input, Hostel.Detials),
                    DB_UTILITY.CreateParameter("@iCategory", DbType.String, ParameterDirection.Input, Hostel.Category),
                    DB_UTILITY.CreateParameter("@iBannerImage", DbType.String, ParameterDirection.Input, Hostel.BannerImage == null ? "" : Hostel.BannerImage),
                    DB_UTILITY.CreateParameter("@iBannerImageAccess", DbType.String, ParameterDirection.Input, Hostel.BannerImageAccess),
                    DB_UTILITY.CreateParameter("@iSliderAccess", DbType.String, ParameterDirection.Input, Hostel.SliderAccess),
                    DB_UTILITY.CreateParameter("@iStateCode", DbType.String, ParameterDirection.Input, Hostel.StateCode),
                    DB_UTILITY.CreateParameter("@iCityCode", DbType.String, ParameterDirection.Input, Hostel.CityCode),
                    DB_UTILITY.CreateParameter("@iAreaCode", DbType.String, ParameterDirection.Input, Hostel.AreaCode),
                    DB_UTILITY.CreateParameter("@iContactNo", DbType.String, ParameterDirection.Input, Hostel.ContactNumber),
                    DB_UTILITY.CreateParameter("@iMailID", DbType.String, ParameterDirection.Input, Hostel.MailID),
                    DB_UTILITY.CreateParameter("@iAddress", DbType.String, ParameterDirection.Input, Hostel.Address),
                    DB_UTILITY.CreateParameter("@iLandmark", DbType.String, ParameterDirection.Input, Hostel.Landmark),
                    DB_UTILITY.CreateParameter("@iShare", DbType.String, ParameterDirection.Input, Hostel.Share),
                    DB_UTILITY.CreateParameter("@iBudget", DbType.String, ParameterDirection.Input, Hostel.Budget),
                    DB_UTILITY.CreateParameter("@iAmenities", DbType.String, ParameterDirection.Input, Hostel.Amenities),
                    DB_UTILITY.CreateParameter("@iGoogleLocation", DbType.String, ParameterDirection.Input, Hostel.GoogleLocation),
                    DB_UTILITY.CreateParameter("@iHomePageAccess", DbType.String, ParameterDirection.Input, Hostel.HomePageAccess),
                    DB_UTILITY.CreateParameter("@iStatus", DbType.String, ParameterDirection.Input, "1")
                };
                dsResultSet = DB_UTILITY.RunSP("USP_INSERTTBL_AGENCY", arrParameter);
                if (ValidateResultSet(dsResultSet))
                {
                    result = Convert.ToBoolean(dsResultSet.Tables[0].Rows[0][0]);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(result);
        }
Ejemplo n.º 13
0
        /// <summary>
        /// Employee DSR Report
        /// Name:Ramu Nimmala
        /// Date:30-09-2017
        /// </summary>
        /// <param name="objRequirement"></param>
        /// <returns></returns>
        public List <DSR> GetDSR(string strDate)
        {
            try
            {
                IDbDataParameter[] arrParameter = new IDbDataParameter[] {
                    DB_UTILITY.CreateParameter("@iDate", DbType.String, ParameterDirection.Input, strDate)
                };

                _dsResultSet = CommonUtility.DB_UTILITY.RunSP("usp_fetchDSR", arrParameter);

                if (ValidateResultSet(_dsResultSet))
                {
                    lstDSR = new List <DSR>();
                    lstDSR = OBJECT_UTILITY.GetConvertCollection <DSR>(_dsResultSet.Tables[0]);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(lstDSR);
        }
Ejemplo n.º 14
0
        /// <summary>
        /// Requirements
        /// Name:hanumantharao muppalla
        /// Date:24-11-2017
        /// </summary>
        /// <param name="objTasks"></param>
        /// <returns></returns>
        public List<Task> GetTaskID(string strTaskID)
        {
            try
            {
                IDbDataParameter[] arrParameter = new IDbDataParameter[]{
                                DB_UTILITY.CreateParameter("@iTaskId", DbType.String, ParameterDirection.Input, strTaskID )                              
                };

                _dsResultSet = CommonUtility.DB_UTILITY.RunSP("usp_auto_fetchTaskDetails", arrParameter);

                if (ValidateResultSet(_dsResultSet))
                {
                    ltask = new List<Task>();
                    ltask = OBJECT_UTILITY.GetConvertCollection<Task>(_dsResultSet.Tables[0]);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return ltask;
        }
Ejemplo n.º 15
0
        /// <summary>
        /// Requirements
        /// Name:Sudha Rani Lingutla
        /// Date:13-06-2017
        /// </summary>
        /// <param name="objTasks"></param>
        /// <returns></returns>
        public List<Task> GetTasks(Task objTasks)
        {
            try
            {
                IDbDataParameter[] arrParameter = new IDbDataParameter[]{
                                DB_UTILITY.CreateParameter("@iUserCode", DbType.Int16, ParameterDirection.Input, objTasks.CreatedByCode )                              
                };

                _dsResultSet = CommonUtility.DB_UTILITY.RunSP("usp_fetchTasks", arrParameter);

                if (ValidateResultSet(_dsResultSet))
                {
                    ltask = new List<Task>();
                    ltask = OBJECT_UTILITY.GetConvertCollection<Task>(_dsResultSet.Tables[0]);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return ltask;
        }
Ejemplo n.º 16
0
        /// <summary>
        /// Check User Login
        /// Name:Ravi Venkatesh Maddela
        /// Date:10-06-2017
        /// </summary>
        /// <param name="objUser"></param>
        /// <returns></returns>
        public User CheckUserLogin(User objUser)
        {
            try
            {
                IDbDataParameter[] arrParameter = new IDbDataParameter[] {
                    DB_UTILITY.CreateParameter("@iUMID", DbType.String, ParameterDirection.Input, objUser.LoginId),
                    DB_UTILITY.CreateParameter("@iPassword", DbType.String, ParameterDirection.Input, objUser.Password),
                };

                _dsResultSet = CommonUtility.DB_UTILITY.RunSP("usp_fetchLoginUser", arrParameter);

                if (ValidateResultSet(_dsResultSet))
                {
                    beMember = OBJECT_UTILITY.GetConvert <User>(_dsResultSet.Tables[0]);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(beMember);
        }
Ejemplo n.º 17
0
        public bool CreateInstitute(Institute Institute)
        {
            bool result = false;

            try
            {
                IDbDataParameter[] arrParameter = new IDbDataParameter[] {
                    DB_UTILITY.CreateParameter("@iTitle", DbType.String, ParameterDirection.Input, Institute.Title),
                    DB_UTILITY.CreateParameter("@iDescription", DbType.String, ParameterDirection.Input, Institute.Details),
                    DB_UTILITY.CreateParameter("@iBannerImage", DbType.String, ParameterDirection.Input, Institute.BannerImage == null ? "" : Institute.BannerImage),
                    DB_UTILITY.CreateParameter("@iBannerImageAccess", DbType.String, ParameterDirection.Input, Institute.BannerImageAccess),
                    DB_UTILITY.CreateParameter("@iSliderAccess", DbType.String, ParameterDirection.Input, Institute.SliderAccess),
                    DB_UTILITY.CreateParameter("@iStateCode", DbType.String, ParameterDirection.Input, Institute.StateCode),
                    DB_UTILITY.CreateParameter("@iCityCode", DbType.String, ParameterDirection.Input, Institute.CityCode),
                    DB_UTILITY.CreateParameter("@iAreaCode", DbType.String, ParameterDirection.Input, Institute.AreaCode),
                    DB_UTILITY.CreateParameter("@iContactNo", DbType.String, ParameterDirection.Input, Institute.ContactNo),
                    DB_UTILITY.CreateParameter("@iMailID", DbType.String, ParameterDirection.Input, Institute.MailID),
                    DB_UTILITY.CreateParameter("@iAddress", DbType.String, ParameterDirection.Input, Institute.Address),
                    DB_UTILITY.CreateParameter("@iLandmark", DbType.String, ParameterDirection.Input, Institute.Landmark),
                    DB_UTILITY.CreateParameter("@iGoogleLocation", DbType.String, ParameterDirection.Input, Institute.GoogleLocation),
                    DB_UTILITY.CreateParameter("@iHomePageAccess", DbType.String, ParameterDirection.Input, Institute.HomePageAccess),
                    DB_UTILITY.CreateParameter("@iStatus", DbType.String, ParameterDirection.Input, "1")
                };
                dsResultSet = DB_UTILITY.RunSP("USP_INSERTTBL_SUPPLIER", arrParameter);
                if (ValidateResultSet(dsResultSet))
                {
                    result = Convert.ToBoolean(dsResultSet.Tables[0].Rows[0][0]);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(result);
        }
Ejemplo n.º 18
0
        //inserting new notification
        public bool InsertNotification(Notification objUser)
        {
            bool blResult;

            try
            {
                IDbDataParameter[] arrParameter = new IDbDataParameter[] {
                    DB_UTILITY.CreateParameter("@iPostedby", DbType.Int32, ParameterDirection.Input, objUser.PostedBy),
                    DB_UTILITY.CreateParameter("@iTitle", DbType.String, ParameterDirection.Input, objUser.Title),
                    DB_UTILITY.CreateParameter("@iDescription", DbType.String, ParameterDirection.Input, objUser.Description),
                    DB_UTILITY.CreateParameter("@iType", DbType.Int32, ParameterDirection.Input, objUser.Type),
                    DB_UTILITY.CreateParameter("@icontroltype", DbType.Int32, ParameterDirection.Input, objUser.Control),
                };

                _dsResultSet = CommonUtility.DB_UTILITY.RunSP("usp_insertNotifications", arrParameter);
                blResult     = true;
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(blResult);
        }
Ejemplo n.º 19
0
        /// <summary>
        /// Requirements
        /// Name:Ravi Venkatesh Maddela
        /// Date:15-07-2017
        /// </summary>
        /// <param name="objTasks"></param>
        /// <returns></returns>
        public List<string> auto_fetchTaskDetails(Task objTasks)
         {
            List<string> lstId = new List<string>();
            try
            {
                IDbDataParameter[] arrParameter = new IDbDataParameter[]{
                                DB_UTILITY.CreateParameter("@iTaskID", DbType.Int32, ParameterDirection.Input, objTasks.TaskId )                              
                };

                _dsResultSet = CommonUtility.DB_UTILITY.RunSP("usp_auto_fetchTaskDetails", arrParameter);

                if (ValidateResultSet(_dsResultSet))
                {
                    ltask = new List<Task>();
                    ltask = OBJECT_UTILITY.GetConvertCollection<Task>(_dsResultSet.Tables[0]);
                    lstId = ltask.Select(s => Convert.ToString(s.TaskId)).ToList();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return lstId;
        }