public string GetCusAutoComplete(int currPage, int NumberRowOfPage, string inputName, string inputType) { string _template = "{0}|{1}|{2}|{3}\n"; StringBuilder result = new StringBuilder(); string InputValue = CXmlPara.CreatePara(new CPara[] { }, inputName); switch (inputType) { case "1": ServiceREF.CustomerService.CustomerService cus_service = new ServiceREF.CustomerService.CustomerService(); ServiceREF.CustomerService.COutputValue cus_output = new ServiceREF.CustomerService.COutputValue(); ServiceREF.CustomerService.CCustomer[] cusList = cus_service.GetCustomerList(InputValue, ref cus_output); foreach (var item in cusList) { result.AppendFormat(_template, item.ID, item.Code, item.Name, item.Address); } break; case "2": ServiceREF.VendorService.VendorService ven_service = new ServiceREF.VendorService.VendorService(); ServiceREF.VendorService.COutputValue ven_output = new ServiceREF.VendorService.COutputValue(); ServiceREF.VendorService.CVendor[] venList = ven_service.GetVendorList(InputValue, ref ven_output); foreach (var item in venList) { result.AppendFormat(_template, item.ID, item.Code, item.Name, item.Address); } break; } return(result.ToString()); }
public string GetObjectName(string exAttribute, string inputType) { string ret = ""; string InputValue = CXmlPara.CreatePara(new CPara[] { }, exAttribute); switch (inputType) { case "1": ServiceREF.CustomerService.CustomerService cus_service = new ServiceREF.CustomerService.CustomerService(); ServiceREF.CustomerService.CCustomer cus = cus_service.GetCustomer(InputValue); ret = CJson.SerializeObject(cus); break; case "2": ServiceREF.VendorService.VendorService ven_service = new ServiceREF.VendorService.VendorService(); ServiceREF.VendorService.CVendor ven = ven_service.GetVendor(InputValue); ret = CJson.SerializeObject(ven); break; case "3": ServiceREF.GeneralLedgerService.CEmployee emp = gl_service.GetEmployee(InputValue); ret = CJson.SerializeObject(emp); break; } return(ret); }
public string GetDataAutoComplete(int currPage, int NumberRowOfPage, string inputName, string inputType) { string _template = "{0}|{1}|{2}\n"; StringBuilder result = new StringBuilder(); string InputValue = CXmlPara.CreatePara(new CPara[] { new CPara("PageIndex", currPage.ToString()), new CPara("RowsPerPage", NumberRowOfPage.ToString()), new CPara("Name", inputName), }, ""); switch (inputType) { case "1": ServiceREF.CustomerService.CustomerService cus_service = new ServiceREF.CustomerService.CustomerService(); ServiceREF.CustomerService.COutputValue cus_output = new ServiceREF.CustomerService.COutputValue(); ServiceREF.CustomerService.CCustomer[] cusList = cus_service.GetCustomerList(InputValue, ref cus_output); foreach (var item in cusList) { result.AppendFormat(_template, item.ID, item.Code, item.Name); } break; case "2": ServiceREF.VendorService.VendorService ven_service = new ServiceREF.VendorService.VendorService(); ServiceREF.VendorService.COutputValue ven_output = new ServiceREF.VendorService.COutputValue(); ServiceREF.VendorService.CVendor[] venList = ven_service.GetVendorList(InputValue, ref ven_output); foreach (var item in venList) { result.AppendFormat(_template, item.ID, item.Code, item.Name); } break; case "3": ServiceREF.GeneralLedgerService.COutputValue gl_output = new ServiceREF.GeneralLedgerService.COutputValue(); ServiceREF.GeneralLedgerService.CEmployee[] empList = gl_service.GetEmployeeList(InputValue, ref gl_output); foreach (var item in empList) { result.AppendFormat(_template, item.ID, item.Code, item.Name); } break; } return(result.ToString()); }
public CGroupBase() { customerService = new ServiceREF.CustomerService.CustomerService(); inventoryService = new ServiceREF.InventoryService.InventoryService(); vendorService = new ServiceREF.VendorService.VendorService(); }