Ejemplo n.º 1
0
        public JsonResult ChangeUserIdStatus()
        {
            string currentuser     = Session["CurrentUserID"].ToString();
            string currentusername = Session["DomainUserName"].ToString();

            string userid    = Request["UserId"];
            string newstatus = Request["NewStatus"];

            Params param = new Params()
            {
                Parameter = new Dictionary <string, string>()
            };

            param.RequestTransType = "ChangeIBILoginByUserId";
            param.Parameter.Add("userId", userid);
            param.Parameter.Add("newStatus", newstatus);
            param.Parameter.Add("agentId", currentusername);

            string start = DateTime.Now.ToString();

            ChangeStatusResult    result    = StatusUpdate.LoginIBI(param);
            ChangeStatusUpdatedBy updatedby = new ChangeStatusUpdatedBy
            {
                ID   = currentuser,
                Name = currentusername
            };

            result.UpdatedBy = updatedby;

            string stop = DateTime.Now.ToString();

            ChangeStatusLog.Write(param, result, start, stop);

            return(Json(result, JsonRequestBehavior.AllowGet));
        }