}// public string GetNextRefNo(string pRefType) { pRefType = pRefType == "" ? "4" : pRefType; string InputValue = CXmlPara.CreatePara(new CPara[] { new CPara("RefDate", DateTime.Now.ToString("yyyy-MM-dd")), new CPara("RefType", pRefType) }, "" ); CRefNo refno = core_service.GetNextRefNo(InputValue); return(CJson.SerializeObject(refno)); }
protected static string GetControls(string customControl) { StringBuilder ret = new StringBuilder(); string InputValue = CXmlPara.CreatePara(new KeyValuePair <string, string>[] { new KeyValuePair <string, string>("CustomControl", customControl) }); ServiceREF.CoreService.CoreService service = new ServiceREF.CoreService.CoreService(); ServiceREF.CoreService.CControl[] arrCtr = service.GetControls(InputValue); ret.Append(CJson.SerializeObject(arrCtr)); return(ret.ToString()); }
public static void RegisterServerConfig(Page page) { CSession session = new CSession(); CJson serverConfig = new CJson( new CPara("Culture", session.Culture), new CPara("DateTime", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")), new CPara("Date", DateTime.Now.ToString("yyyy-MM-dd")), new CPara("DateFrom", DateTime.Now.AddMonths(FromDate_ByMonth).ToString("yyyy-MM-dd")), new CPara("ServiceData", ServiceUrl), new CPara("ClientKey", ClientKey), new CPara("VirtualDirectory", VirtualDirectory), new CPara("HostName", HostName) ); StringBuilder script = new StringBuilder(); script.AppendFormat("var FWS_SERVER_CONFIG = {0}; \n", serverConfig.ToJson()); page.ClientScript.RegisterClientScriptBlock(page.GetType(), "FWS.Server.Config", script.ToString(), true); }