public void SetUserTempKey(ClientUtility client) { string userInformation = JsonConvert.SerializeObject(client.UserInfo); HttpCookie cookie = new HttpCookie(CommonMethods.UserTempInfoKey); cookie.Value = userInformation.Encrypt(); cookie.Expires = client.UserInfo.ExpiresDate; Response.Cookies.Add(cookie); }
private void BindAgency() { var client = new BKIC.SellingPoint.Presentation.ClientUtility(); client.serviceManger = new KBIC.Utility.DataServiceManager(BKIC.SellingPoint.Presentation.ClientUtility.WebApiUri, "", false); var dropDownResult = client.serviceManger.GetData <BKIC.SellingPoint.DTO.RequestResponseWrappers.ApiResponseWrapper <BKIC.SellingPoint.DTO.RequestResponseWrappers.FetchDropDownsResponse> > (BKIC.SellingPont.DTO.Constants.DropdownURI.GetPageDropDowns.Replace("{type}", BKIC.SellingPoint.DTO.RequestResponseWrappers.PageType.Reports)); if (dropDownResult.StatusCode == 200 && dropDownResult.Result.IsTransactionDone == true) { DataSet dropdownds = JsonConvert.DeserializeObject <DataSet>(dropDownResult.Result.dropdownresult); DataTable AgencyDt = dropdownds.Tables["AgentCodeDD"]; ddlAgency.DataValueField = "AgentCode"; ddlAgency.DataTextField = "Agency"; ddlAgency.DataSource = AgencyDt; ddlAgency.DataBind(); ddlAgency.Items.Insert(0, new ListItem("--Please Select--", "")); SetDefaultAgency(); } }