private void BlockCorporateCardOnCAF(string cardNo) { string currentuser = Session["CurrentUserID"].ToString(); string currentusername = Session["DomainUserName"].ToString(); Guid userguid = new Guid(currentuser); SystemUser user = db.systemUser.Single(p => p.SystemUserId == userguid); string usernum = String.IsNullOrEmpty(user.TandemUserNum) ? String.Empty : user.TandemUserNum; string usergroup = String.IsNullOrEmpty(user.TandemUserGroup) ? String.Empty : user.TandemUserGroup; Params param = new Params() { Parameter = new Dictionary <string, string>() }; param.RequestTransType = "ChangeATMStatusByAtmNo"; param.Parameter.Add("atmNo", cardNo); param.Parameter.Add("newStatus", "2"); param.Parameter.Add("sUserNum", usernum); param.Parameter.Add("sUserGroup", usergroup); string start = DateTime.Now.ToString(); ChangeStatusResult result = StatusUpdate.Card(param); ChangeStatusUpdatedBy updatedby = new ChangeStatusUpdatedBy { ID = currentuser, Name = currentusername }; result.UpdatedBy = updatedby; string stop = DateTime.Now.ToString(); ChangeStatusLog.Write(param, result, start, stop); }
public JsonResult ChangeBlockStatus() { string currentuser = Session["CurrentUserID"].ToString(); string currentusername = Session["DomainUserName"].ToString(); Guid userguid = new Guid(currentuser); SystemUser user = db.systemUser.Single(p => p.SystemUserId == userguid); string usernum = String.IsNullOrEmpty(user.TandemUserNum) ? String.Empty : user.TandemUserNum; string usergroup = String.IsNullOrEmpty(user.TandemUserGroup) ? String.Empty : user.TandemUserGroup; string cardno = Request["CardNo"]; string newstatus = Request["NewStatus"]; Params param = new Params() { Parameter = new Dictionary <string, string>() }; param.RequestTransType = "ChangeCCStatusByCCNo"; param.Parameter.Add("cardNo", cardno); param.Parameter.Add("newStatus", newstatus); param.Parameter.Add("sUserNum", usernum); param.Parameter.Add("sUserGroup", usergroup); param.Parameter.Add("userId", currentusername); string start = DateTime.Now.ToString(); ChangeStatusResult result = StatusUpdate.Card(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)); }