/// <summary> /// Return list data of usergroup /// </summary> /// <param name="totalRow">total of record in db</param> /// <param name="take">Get n row</param> /// <param name="skip">skip n row</param> /// <returns></returns> public string GetDataPaging(int take = 10, int skip = 0) { LcLImpList model = new LcLImpList(); UserInfo usInfo = System.Web.HttpContext.Current.Session["UserInfo"] as UserInfo; model.total = _lcLImpService.GetAllLcLImp().Count(); model.data = _lcLImpService.GetAllLcLImp(); //for (int i = 0; i < model.data.Count; i++) //{ // // model.data[i].JobNo = WebUtility.HtmlDecode(model.data[i].FirstName == null ? "" : model.data[i].FirstName) + " " + WebUtility.HtmlDecode(model.data[i].LastName == null ? "" : model.data[i].LastName); // model.data[i].JobNo = model.data // model.data[i].MobilePhone = model.data[i].MobilePhone == null ? "" : model.data[i].MobilePhone; // model.data[i].CustomerLogo = model.data[i].CustomerLogo == null ? "/Tenants/" + usInfo.TenantAlias + "/default.png" : "/Tenants/" + usInfo.TenantAlias + "/" + model.data[i].CustomerLogo; //} return(JsonConvert.SerializeObject(model)); }
public string RenderGridUserGroup() { //variables LcLImpList model; UserInfo usInfo = System.Web.HttpContext.Current.Session["UserInfo"] as UserInfo; #region Definite column model = new LcLImpList(); model.column = new List <ColumnRoleModel>(); ColumnRoleModel colJobNo = new ColumnRoleModel() { title = "JobNo", field = "JobNo", template = "#=JobNo#" }; model.column.Add(colJobNo); ColumnRoleModel colCreated = new ColumnRoleModel() { title = "Created", field = "Created", template = "#=kendo.toString(new Date(Created),'yyyy.MM.dd')#" }; model.column.Add(colCreated); ColumnRoleModel colEta = new ColumnRoleModel() { title = "Eta", field = "Eta", template = "#=kendo.toString(new Date(Eta),'yyyy.MM.dd')#" }; model.column.Add(colEta); ColumnRoleModel colMBLNo = new ColumnRoleModel() { title = "M-B/L No", field = "JobNo", template = "#=MBLNo#" }; model.column.Add(colMBLNo); ColumnRoleModel colPOLId = new ColumnRoleModel() { title = "POLId", field = "POLId", template = "#=POLId#" }; model.column.Add(colPOLId); //ColumnRoleModel colCommodity = new ColumnRoleModel() { title = "Commodity", field = "Commodity", template = "#=Commodity#" }; model.column.Add(colCommodity); //ColumnRoleModel colMBLType = new ColumnRoleModel() { title = "MBLType", field = "MBLType", template = "#=MBLType#" }; model.column.Add(colMBLType); //ColumnRoleModel colETDDate = new ColumnRoleModel() { title = "ETDDate", field = "ETDDate", template = "#=ETDDate#" }; model.column.Add(colETDDate); //ColumnRoleModel colETDType = new ColumnRoleModel() { title = "ETDType", field = "ETDType", template = "#=ETDType#" }; model.column.Add(colETDType); //ColumnRoleModel colContactId = new ColumnRoleModel() { title = "ContactId", field = "ContactId", template = "#=ContactId#" }; model.column.Add(colContactId); //ColumnRoleModel colSCName = new ColumnRoleModel() { title = "SCName", field = "SCName", template = "#=SCName#" }; model.column.Add(colSCName); //ColumnRoleModel colVessel = new ColumnRoleModel() { title = "Vessel", field = "Vessel", template = "#=Vessel#" }; model.column.Add(colVessel); //ColumnRoleModel colPODId = new ColumnRoleModel() { title = "PODId", field = "PODId", template = "#=PODId#" }; model.column.Add(colPODId); //ColumnRoleModel colPackageAmount = new ColumnRoleModel() { title = "PackageAmount", field = "PackageAmount", template = "#=PackageAmount#" }; model.column.Add(colPackageAmount); //ColumnRoleModel colPackageType = new ColumnRoleModel() { title = "PackageType", field = "PackageType", template = "#=PackageType#" }; model.column.Add(colPackageType); //ColumnRoleModel colService = new ColumnRoleModel() { title = "Service", field = "Service", template = "#=Service#" }; model.column.Add(colService); //ColumnRoleModel colisFinish = new ColumnRoleModel() { title = "isFinish", field = "isFinish", template = "#=isFinish#" }; model.column.Add(colisFinish); //ColumnRoleModel colCoLoaderId = new ColumnRoleModel() { title = "CoLoaderId", field = "CoLoaderId", template = "#=CoLoaderId#" }; model.column.Add(colCoLoaderId); //ColumnRoleModel colAgentId = new ColumnRoleModel() { title = "AgentId", field = "AgentId", template = "#=AgentId#" }; model.column.Add(colAgentId); //ColumnRoleModel colVoyage = new ColumnRoleModel() { title = "Voyage", field = "Voyage", template = "#=Voyage#" }; model.column.Add(colVoyage); //ColumnRoleModel colDelivery = new ColumnRoleModel() { title = "Delivery", field = "Delivery", template = "#=Delivery#" }; model.column.Add(colMBLNo); //ColumnRoleModel colGW = new ColumnRoleModel() { title = "GW", field = "GW", template = "#=GW#" }; model.column.Add(colGW); //ColumnRoleModel colCBM = new ColumnRoleModel() { title = "CBM", field = "CBM", template = "#=CBM#" }; model.column.Add(colCBM); //ColumnRoleModel colNote = new ColumnRoleModel() { title = "Note", field = "Note", template = "#=Note#" }; model.column.Add(colNote); //ColumnRoleModel colCreatedDate = new ColumnRoleModel() { title = "CreatedDate", field = "CreatedDate", template = "#=kendo.toString(new Date(CreatedDate),'yyyy.MM.dd')#" }; model.column.Add(colCreatedDate); //ColumnRoleModel colLogo = new ColumnRoleModel() { title = "Logo", field = "CustomerLogo", template = "<div style='text-align:center'><img src='#=CustomerLogo#' width='48px' height='48px' /></div>" }; model.column.Add(colLogo); //ColumnRoleModel colOrgNumber = new ColumnRoleModel() { title = "OrgNumber", field = "OrgNumber" }; model.column.Add(colOrgNumber); //ColumnRoleModel colCreatedDate = new ColumnRoleModel() { title = "CreatedDate", field = "CreatedDate", template = "#=kendo.toString(new Date(CreatedDate),'yyyy.MM.dd')#" }; model.column.Add(colCreatedDate); //model.total = _roleService.GetAllRoles(usInfo.IsTenant, false, usInfo.TenanID).Count(); //var _lst = _roleService.GetAllRoles(usInfo.IsTenant, false, usInfo.TenanID).Count(); #endregion return(JsonConvert.SerializeObject(model)); }