public List <UserRegistrationBO> getUsersList()
        {
            DataSet                   objDataSet                = null;
            UserRegistrationBO        objUserRegistrationBO     = null;
            List <UserRegistrationBO> objUserRegistrationBOList = new List <UserRegistrationBO>();
            List <ProcParameterBO>    objProcParameterBOList    = new List <ProcParameterBO>();

            try
            {
                objDataSet = objDBAccess.execuitDataSet(ProcGetUsersList, ref objProcParameterBOList);
                if (objDataSet != null && objDataSet.Tables.Count > 0)
                {
                    for (int i = 0; i < objDataSet.Tables[0].Rows.Count; i++)
                    {
                        objUserRegistrationBO              = new UserRegistrationBO();
                        objUserRegistrationBO.UserId       = Convert.ToInt32(objDataSet.Tables[0].Rows[i][0].ToString());
                        objUserRegistrationBO.FirstName    = objDataSet.Tables[0].Rows[i][1].ToString();
                        objUserRegistrationBO.LastName     = objDataSet.Tables[0].Rows[i][2].ToString();
                        objUserRegistrationBO.EmailAddress = objDataSet.Tables[0].Rows[i][3].ToString();
                        objUserRegistrationBO.MobileNumber = objDataSet.Tables[0].Rows[i][4].ToString();
                        objUserRegistrationBO.Department   = objDataSet.Tables[0].Rows[i][5].ToString();
                        objUserRegistrationBO.City         = objDataSet.Tables[0].Rows[i][6].ToString();
                        objUserRegistrationBO.IsActive     = Convert.ToBoolean(objDataSet.Tables[0].Rows[i][7].ToString());
                        objUserRegistrationBOList.Add(objUserRegistrationBO);
                    }
                }
            }
            catch (Exception ex)
            {
                ExceptionError.Error_Log(ex, "getUsersList");
                throw ex;
            }
            return(objUserRegistrationBOList);
        }
예제 #2
0
        public ActionResult Index()
        {
            ViewBag.MainTitle = "UserRegistration";
            ViewBag.Title     = "Users";
            ViewBag.Icon      = "fa fa-user";
            UserRegistrationBO objUserRegistrationBO = new UserRegistrationBO();

            return(View(objUserRegistrationBO));
        }
        public UserRegistrationBO EditUserDetails(int iUserId)
        {
            DataSet                objDataSet             = null;
            UserRegistrationBO     objUserRegistrationBO  = null;
            List <ProcParameterBO> objProcParameterBOList = new List <ProcParameterBO>();

            try
            {
                ProcParameterBO objDbParameter = new ProcParameterBO();
                objDbParameter.Direction      = ParameterDirection.Input;
                objDbParameter.ParameterName  = "@iuserId";
                objDbParameter.dbType         = DbType.Int32;
                objDbParameter.ParameterValue = iUserId;
                objProcParameterBOList.Add(objDbParameter);

                objDataSet = objDBAccess.execuitDataSet(ProcEditUser, ref objProcParameterBOList);
                if (objDataSet != null && objDataSet.Tables[0].Rows.Count > 0)
                {
                    objUserRegistrationBO            = new UserRegistrationBO();
                    objUserRegistrationBO.UserId     = Convert.ToInt32(objDataSet.Tables[0].Rows[0][0].ToString());
                    objUserRegistrationBO.FirstName  = objDataSet.Tables[0].Rows[0][1].ToString();
                    objUserRegistrationBO.MiddleName = objDataSet.Tables[0].Rows[0][2].ToString();
                    objUserRegistrationBO.LastName   = objDataSet.Tables[0].Rows[0][3].ToString();
                    objUserRegistrationBO.Photo      = objDataSet.Tables[0].Rows[0][4].ToString();
                    objUserRegistrationBO.Password   = objDataSet.Tables[0].Rows[0][5].ToString();
                    //objUserRegistrationBO.ConfirmPassword = objDataSet.Tables[0].Rows[0][6].ToString();
                    objUserRegistrationBO.Gender                = objDataSet.Tables[0].Rows[0][6].ToString();
                    objUserRegistrationBO.MobileNumber          = objDataSet.Tables[0].Rows[0][7].ToString();
                    objUserRegistrationBO.AlternateMobileNumber = objDataSet.Tables[0].Rows[0][8].ToString();
                    objUserRegistrationBO.EmailAddress          = objDataSet.Tables[0].Rows[0][9].ToString();
                    objUserRegistrationBO.Language              = objDataSet.Tables[0].Rows[0][10].ToString();
                    objUserRegistrationBO.Qualification         = objDataSet.Tables[0].Rows[0][11].ToString();
                    objUserRegistrationBO.College               = objDataSet.Tables[0].Rows[0][12].ToString();
                    objUserRegistrationBO.University            = objDataSet.Tables[0].Rows[0][13].ToString();
                    objUserRegistrationBO.AggregatePercentage   = objDataSet.Tables[0].Rows[0][14].ToString();
                    objUserRegistrationBO.JoiningDate           = objDataSet.Tables[0].Rows[0][15].ToString();
                    objUserRegistrationBO.CountryId             = Convert.ToInt32(objDataSet.Tables[0].Rows[0][16].ToString());
                    objUserRegistrationBO.StateId               = Convert.ToInt32(objDataSet.Tables[0].Rows[0][17].ToString());
                    objUserRegistrationBO.City          = objDataSet.Tables[0].Rows[0][18].ToString();
                    objUserRegistrationBO.UserType      = objDataSet.Tables[0].Rows[0][19].ToString();
                    objUserRegistrationBO.UserRole      = objDataSet.Tables[0].Rows[0][20].ToString();
                    objUserRegistrationBO.DonorProgram  = objDataSet.Tables[0].Rows[0][21].ToString();
                    objUserRegistrationBO.Department    = objDataSet.Tables[0].Rows[0][22].ToString();
                    objUserRegistrationBO.Address       = objDataSet.Tables[0].Rows[0][23].ToString();
                    objUserRegistrationBO.IsActive      = Convert.ToBoolean(objDataSet.Tables[0].Rows[0][24].ToString());
                    objUserRegistrationBO.DateOfBirth   = objDataSet.Tables[0].Rows[0][25].ToString();
                    objUserRegistrationBO.FileSavedName = objDataSet.Tables[0].Rows[0][26].ToString();
                    objUserRegistrationBO.LocationId    = Convert.ToInt32(objDataSet.Tables[0].Rows[0][27].ToString());
                }
            }
            catch (Exception ex)
            {
                ExceptionError.Error_Log(ex, "EditUserDetails");
                throw ex;
            }
            return(objUserRegistrationBO);
        }
예제 #4
0
        public ActionResult CreateUser()
        {
            ViewBag.MainTitle = "UserRegistration";
            ViewBag.Title     = "Users";
            ViewBag.Icon      = "fa fa-user";
            UserRegistrationBO  objUserRegistrationBO  = new UserRegistrationBO();
            UserRegistrationBAL objUserRegistrationBAL = new UserRegistrationBAL();

            objUserRegistrationBO.CountriesList    = objUserRegistrationBAL.CountriesList();
            objUserRegistrationBO.RolesList        = objUserRegistrationBAL.RolesList();
            objUserRegistrationBO.GenderList       = objUserRegistrationBAL.GenderList();
            objUserRegistrationBO.LocationList     = objUserRegistrationBAL.LocationList();
            objUserRegistrationBO.DonorProgramList = objUserRegistrationBAL.getDonorProgramList(Convert.ToInt32(ViewData["LoginUserId"]));
            @ViewBag.ImagePath = Url.Content("../assets/images/user-1.png");
            return(PartialView("AddUser", objUserRegistrationBO));
        }
예제 #5
0
        public ActionResult ViewUser(int iUserId)
        {
            UserRegistrationBAL objUserRegistrationBAL = new UserRegistrationBAL();
            UserRegistrationBO  objUserRegistrationBO  = objUserRegistrationBAL.DisplayUser(iUserId);

            objUserRegistrationBO.GenderList = objUserRegistrationBAL.GenderList();
            if (objUserRegistrationBO.FileSavedName == "")
            {
                ViewBag.ImagePath = Url.Content("../assets/images/user-1.png");
            }
            else
            {
                ViewBag.ImagePath = Url.Content(strImageDisplayPath + objUserRegistrationBO.FileSavedName);
            }
            return(PartialView("ViewUser", objUserRegistrationBO));
        }
예제 #6
0
        public ActionResult EditUser(int iUserId)
        {
            UserRegistrationBAL objUserRegistrationBAL = new UserRegistrationBAL();
            UserRegistrationBO  objUserRegistrationBO  = objUserRegistrationBAL.EditUserDetails(iUserId);

            objUserRegistrationBO.CountriesList    = objUserRegistrationBAL.CountriesList();
            objUserRegistrationBO.GenderList       = objUserRegistrationBAL.GenderList();
            objUserRegistrationBO.RolesList        = objUserRegistrationBAL.RolesList();
            objUserRegistrationBO.LocationList     = objUserRegistrationBAL.LocationList();
            objUserRegistrationBO.DonorProgramList = objUserRegistrationBAL.getDonorProgramList(iUserId);

            if (objUserRegistrationBO.FileSavedName == "" || objUserRegistrationBO.FileSavedName == null)
            {
                ViewBag.ImagePath = Url.Content("../assets/images/user-1.png");
            }
            else
            {
                ViewBag.ImagePath = Url.Content(strImageDisplayPath + objUserRegistrationBO.FileSavedName);
            }

            return(PartialView("EditUserView", objUserRegistrationBO));
        }
예제 #7
0
        public JsonResult SaveUserRegistration(UserRegistrationBO Data)
        {
            if (Request.Files.Count > 0)
            {
                string strFileName           = "";
                string strExtention          = "";
                HttpFileCollectionBase files = Request.Files;
                for (int i = 0; i < files.Count; i++)
                {
                    HttpPostedFileBase file = files[i];
                    strExtention       = Path.GetExtension(file.FileName);
                    strFileName        = ViewData["LoginUserId"].ToString() + "_" + DateTime.UtcNow.ToString("yyyyMMddHHmmssfff", CultureInfo.InvariantCulture) + strExtention;
                    Data.FileSavedName = strFileName;
                    strFileName        = Path.Combine(strFileUploadPath, strFileName);
                    file.SaveAs(strFileName);
                }
            }
            UserRegistrationBAL objUserRegistrationBAL = new UserRegistrationBAL();
            //Data.IsActive = true;
            string strResult = objUserRegistrationBAL.SaveorUpdateUserRegistration(Data, Convert.ToInt32(ViewData["LoginUserId"]));

            return(Json(strResult, JsonRequestBehavior.AllowGet));
        }
        public string SaveorUpdateUserRegistration(UserRegistrationBO objUserRegistrationBO, int A_iUserId)
        {
            List <ProcParameterBO> objProcParameterBOList = new List <ProcParameterBO>();
            ProcParameterBO        objDBparameter         = null;
            string strResult = "";

            try
            {
                objDBparameter                = new ProcParameterBO();
                objDBparameter.Direction      = ParameterDirection.Input;
                objDBparameter.ParameterName  = "@iUserId";
                objDBparameter.dbType         = DbType.Int32;
                objDBparameter.ParameterValue = objUserRegistrationBO.UserId;
                objProcParameterBOList.Add(objDBparameter);

                objDBparameter                = new ProcParameterBO();
                objDBparameter.Direction      = ParameterDirection.Input;
                objDBparameter.ParameterName  = "@strFirstName";
                objDBparameter.dbType         = DbType.String;
                objDBparameter.ParameterValue = objUserRegistrationBO.FirstName;
                objProcParameterBOList.Add(objDBparameter);

                objDBparameter                = new ProcParameterBO();
                objDBparameter.Direction      = ParameterDirection.Input;
                objDBparameter.ParameterName  = "@strMiddleName";
                objDBparameter.dbType         = DbType.String;
                objDBparameter.ParameterValue = objUserRegistrationBO.MiddleName;
                objProcParameterBOList.Add(objDBparameter);

                objDBparameter                = new ProcParameterBO();
                objDBparameter.Direction      = ParameterDirection.Input;
                objDBparameter.ParameterName  = "@strLastName";
                objDBparameter.dbType         = DbType.String;
                objDBparameter.ParameterValue = objUserRegistrationBO.LastName;
                objProcParameterBOList.Add(objDBparameter);

                objDBparameter                = new ProcParameterBO();
                objDBparameter.Direction      = ParameterDirection.Input;
                objDBparameter.ParameterName  = "@strPhoto";
                objDBparameter.dbType         = DbType.String;
                objDBparameter.ParameterValue = objUserRegistrationBO.Photo;
                objProcParameterBOList.Add(objDBparameter);

                objDBparameter                = new ProcParameterBO();
                objDBparameter.Direction      = ParameterDirection.Input;
                objDBparameter.ParameterName  = "@strActualFileName";
                objDBparameter.dbType         = DbType.String;
                objDBparameter.ParameterValue = objUserRegistrationBO.FileSavedName;
                objProcParameterBOList.Add(objDBparameter);

                objDBparameter                = new ProcParameterBO();
                objDBparameter.Direction      = ParameterDirection.Input;
                objDBparameter.ParameterName  = "@strPassword";
                objDBparameter.dbType         = DbType.String;
                objDBparameter.ParameterValue = objUserRegistrationBO.Password;
                objProcParameterBOList.Add(objDBparameter);

                objDBparameter                = new ProcParameterBO();
                objDBparameter.Direction      = ParameterDirection.Input;
                objDBparameter.ParameterName  = "@strDateOfBirth";
                objDBparameter.dbType         = DbType.String;
                objDBparameter.ParameterValue = objUserRegistrationBO.DateOfBirth;
                objProcParameterBOList.Add(objDBparameter);

                objDBparameter                = new ProcParameterBO();
                objDBparameter.Direction      = ParameterDirection.Input;
                objDBparameter.ParameterName  = "@strGender";
                objDBparameter.dbType         = DbType.String;
                objDBparameter.ParameterValue = objUserRegistrationBO.Gender;
                objProcParameterBOList.Add(objDBparameter);

                objDBparameter                = new ProcParameterBO();
                objDBparameter.Direction      = ParameterDirection.Input;
                objDBparameter.ParameterName  = "@strMobileNumber";
                objDBparameter.dbType         = DbType.String;
                objDBparameter.ParameterValue = objUserRegistrationBO.MobileNumber;
                objProcParameterBOList.Add(objDBparameter);

                objDBparameter                = new ProcParameterBO();
                objDBparameter.Direction      = ParameterDirection.Input;
                objDBparameter.ParameterName  = "@strAlternateMobileNumber";
                objDBparameter.dbType         = DbType.String;
                objDBparameter.ParameterValue = objUserRegistrationBO.AlternateMobileNumber;
                objProcParameterBOList.Add(objDBparameter);

                objDBparameter                = new ProcParameterBO();
                objDBparameter.Direction      = ParameterDirection.Input;
                objDBparameter.ParameterName  = "@strEmailAddress";
                objDBparameter.dbType         = DbType.String;
                objDBparameter.ParameterValue = objUserRegistrationBO.EmailAddress;
                objProcParameterBOList.Add(objDBparameter);

                objDBparameter                = new ProcParameterBO();
                objDBparameter.Direction      = ParameterDirection.Input;
                objDBparameter.ParameterName  = "@strLanguage";
                objDBparameter.dbType         = DbType.String;
                objDBparameter.ParameterValue = objUserRegistrationBO.Language;
                objProcParameterBOList.Add(objDBparameter);

                objDBparameter                = new ProcParameterBO();
                objDBparameter.Direction      = ParameterDirection.Input;
                objDBparameter.ParameterName  = "@strQualification";
                objDBparameter.dbType         = DbType.String;
                objDBparameter.ParameterValue = objUserRegistrationBO.Qualification;
                objProcParameterBOList.Add(objDBparameter);

                objDBparameter                = new ProcParameterBO();
                objDBparameter.Direction      = ParameterDirection.Input;
                objDBparameter.ParameterName  = "@strCollege";
                objDBparameter.dbType         = DbType.String;
                objDBparameter.ParameterValue = objUserRegistrationBO.College;
                objProcParameterBOList.Add(objDBparameter);

                objDBparameter                = new ProcParameterBO();
                objDBparameter.Direction      = ParameterDirection.Input;
                objDBparameter.ParameterName  = "@strUniversity";
                objDBparameter.dbType         = DbType.String;
                objDBparameter.ParameterValue = objUserRegistrationBO.University;
                objProcParameterBOList.Add(objDBparameter);

                objDBparameter                = new ProcParameterBO();
                objDBparameter.Direction      = ParameterDirection.Input;
                objDBparameter.ParameterName  = "@strAggregatePercentage";
                objDBparameter.dbType         = DbType.String;
                objDBparameter.ParameterValue = objUserRegistrationBO.AggregatePercentage;
                objProcParameterBOList.Add(objDBparameter);

                objDBparameter                = new ProcParameterBO();
                objDBparameter.Direction      = ParameterDirection.Input;
                objDBparameter.ParameterName  = "@strJoiningDate";
                objDBparameter.dbType         = DbType.String;
                objDBparameter.ParameterValue = objUserRegistrationBO.JoiningDate;
                objProcParameterBOList.Add(objDBparameter);

                objDBparameter                = new ProcParameterBO();
                objDBparameter.Direction      = ParameterDirection.Input;
                objDBparameter.ParameterName  = "@strCountry";
                objDBparameter.dbType         = DbType.Int32;
                objDBparameter.ParameterValue = objUserRegistrationBO.CountryId;
                objProcParameterBOList.Add(objDBparameter);

                objDBparameter                = new ProcParameterBO();
                objDBparameter.Direction      = ParameterDirection.Input;
                objDBparameter.ParameterName  = "@strState";
                objDBparameter.dbType         = DbType.Int32;
                objDBparameter.ParameterValue = objUserRegistrationBO.StateId;
                objProcParameterBOList.Add(objDBparameter);

                objDBparameter                = new ProcParameterBO();
                objDBparameter.Direction      = ParameterDirection.Input;
                objDBparameter.ParameterName  = "@strCity";
                objDBparameter.dbType         = DbType.String;
                objDBparameter.ParameterValue = objUserRegistrationBO.City;
                objProcParameterBOList.Add(objDBparameter);

                objDBparameter                = new ProcParameterBO();
                objDBparameter.Direction      = ParameterDirection.Input;
                objDBparameter.ParameterName  = "@iLocationId";
                objDBparameter.dbType         = DbType.Int32;
                objDBparameter.ParameterValue = objUserRegistrationBO.LocationId;
                objProcParameterBOList.Add(objDBparameter);

                objDBparameter                = new ProcParameterBO();
                objDBparameter.Direction      = ParameterDirection.Input;
                objDBparameter.ParameterName  = "@strUserType";
                objDBparameter.dbType         = DbType.String;
                objDBparameter.ParameterValue = objUserRegistrationBO.UserType;
                objProcParameterBOList.Add(objDBparameter);


                objDBparameter                = new ProcParameterBO();
                objDBparameter.Direction      = ParameterDirection.Input;
                objDBparameter.ParameterName  = "@iRoleId";
                objDBparameter.dbType         = DbType.String;
                objDBparameter.ParameterValue = objUserRegistrationBO.UserRole;
                objProcParameterBOList.Add(objDBparameter);

                objDBparameter                = new ProcParameterBO();
                objDBparameter.Direction      = ParameterDirection.Input;
                objDBparameter.ParameterName  = "@strDonorProgram";
                objDBparameter.dbType         = DbType.String;
                objDBparameter.ParameterValue = objUserRegistrationBO.DonorProgram;
                objProcParameterBOList.Add(objDBparameter);

                objDBparameter                = new ProcParameterBO();
                objDBparameter.Direction      = ParameterDirection.Input;
                objDBparameter.ParameterName  = "@strDepartment";
                objDBparameter.dbType         = DbType.String;
                objDBparameter.ParameterValue = objUserRegistrationBO.Department;
                objProcParameterBOList.Add(objDBparameter);

                objDBparameter                = new ProcParameterBO();
                objDBparameter.Direction      = ParameterDirection.Input;
                objDBparameter.ParameterName  = "@iApplicantId";
                objDBparameter.dbType         = DbType.Int32;
                objDBparameter.ParameterValue = 0;
                objProcParameterBOList.Add(objDBparameter);


                objDBparameter                = new ProcParameterBO();
                objDBparameter.Direction      = ParameterDirection.Input;
                objDBparameter.ParameterName  = "@strAddress";
                objDBparameter.dbType         = DbType.String;
                objDBparameter.ParameterValue = objUserRegistrationBO.Address;
                objProcParameterBOList.Add(objDBparameter);


                objDBparameter                = new ProcParameterBO();
                objDBparameter.Direction      = ParameterDirection.Input;
                objDBparameter.ParameterName  = "@bIsActive";
                objDBparameter.dbType         = DbType.Boolean;
                objDBparameter.ParameterValue = objUserRegistrationBO.IsActive;
                objProcParameterBOList.Add(objDBparameter);

                objDBparameter                = new ProcParameterBO();
                objDBparameter.Direction      = ParameterDirection.Input;
                objDBparameter.ParameterName  = "@buserid";
                objDBparameter.dbType         = DbType.Int32;
                objDBparameter.ParameterValue = A_iUserId;
                objProcParameterBOList.Add(objDBparameter);

                objDBparameter               = new ProcParameterBO();
                objDBparameter.Direction     = ParameterDirection.Output;
                objDBparameter.ParameterName = "@strResult";
                objDBparameter.dbType        = DbType.String;
                objDBparameter.Size          = 100;
                objProcParameterBOList.Add(objDBparameter);


                objDBAccess.executeNonQuery(ProcSaveUserRegistration, ref objProcParameterBOList);

                for (int i = 0; i < objProcParameterBOList.Count; i++)
                {
                    if (objProcParameterBOList[i].Direction == ParameterDirection.Output)
                    {
                        strResult = objProcParameterBOList[i].ParameterValue.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                ExceptionError.Error_Log(ex, "SaveorUpdateUserRegistration");
                strResult = "FAILED";
                throw ex;
            }
            return(strResult);
        }
예제 #9
0
 public string SaveorUpdateUserRegistration(UserRegistrationBO objUserRegistrationBO, int iUserId)
 {
     return(objUserRegistrationDAL.SaveorUpdateUserRegistration(objUserRegistrationBO, iUserId));
 }