Esempio n. 1
0
        public string UpdateUsers(string Usersname, string firstname, string lastname, string emailID, string contact, bool Active, int id, string Groups)
        {
            object result    = null;
            string strReturn = string.Empty;

            try
            {
                eUsers Obj = new eUsers();
                Obj              = BL_Users.GetSingleRecordById(id);
                Obj.sUserName    = emailID;
                Obj.sFirstName   = firstname;
                Obj.sLastName    = lastname;
                Obj.sEmail       = emailID;
                Obj.sContact     = contact;
                Obj.dtCreatedOn  = DateTime.Now;
                Obj.dtActionDate = DateTime.Now;
                Obj.cStatus      = Active ? "A" : "I";
                int a = ((OneFineRateBLL.BL_Login.UserDetails)Session["UserDetails"]).iUserId;
                Obj.iActionBy = a;
                int i = BL_Users.UpdateRecord(Obj, Groups.Substring(0, Groups.Length - 1));
                if (i == 1)
                {
                    result = new { st = 1, msg = clsUtils.ErrorMsg("User", 2) };
                }
                else
                {
                    result = new { st = 0, msg = clsUtils.ErrorMsg("User", 0) };
                }
            }
            catch (Exception)
            {
                result = new { st = 0, msg = clsUtils.ErrorMsg("", 3) };
            }
            strReturn = OneFineRateAppUtil.clsUtils.ConvertToJson(result);
            return(strReturn);
        }