public bool Insert(string connstr, string ArchType, string DocList, out string ErrMsg) { if (string.IsNullOrEmpty(ArchType)) { ErrMsg = "档案类型不能为空!"; return(false); } try { switch (ArchType.ToLower()) { case "rdrecord10": arch = new U8.Interface.Bus.WebService.Biz.Voucher.clsRdrecord10(); break; case "person": arch = new U8.Interface.Bus.WebService.Biz.Voucher.clsPerson(); break; case "optransform": arch = new U8.Interface.Bus.WebService.Biz.Voucher.clsOptransform(); break; default: break; } if (arch == null) { ErrMsg = "没有相应档案的服务!"; return(false); } arch.connStr = connstr; return(arch.Insert(DocList, out ErrMsg)); } catch { ErrMsg = "WebService Insert方法出错"; return(false); } }
public bool GetList(string connstr, string ArchType, out string DocList, out string ErrMsg) { if (string.IsNullOrEmpty(ArchType)) { DocList = null; ErrMsg = "档案类型不能为空!"; return(false); } try { switch (ArchType.ToLower()) { case "department": arch = new U8.Interface.Bus.WebService.Biz.Archive.clsDepartment(); arch.connStr = connstr; arch.GetList(out DocList, out ErrMsg); break; case "person": arch = new U8.Interface.Bus.WebService.Biz.Archive.clsPerson(); arch.connStr = connstr; arch.GetList(out DocList, out ErrMsg); break; case "inventory": arch = new U8.Interface.Bus.WebService.Biz.Archive.clsInventory(); arch.connStr = connstr; arch.GetList(out DocList, out ErrMsg); break; case "inventoryclass": arch = new U8.Interface.Bus.WebService.Biz.Archive.clsInventoryClass(); arch.connStr = connstr; arch.GetList(out DocList, out ErrMsg); break; case "computationunit": arch = new U8.Interface.Bus.WebService.Biz.Archive.clsComputationUnit(); arch.connStr = connstr; arch.GetList(out DocList, out ErrMsg); break; case "mom_order": arch = new U8.Interface.Bus.WebService.Biz.Archive.clsMom_order(); arch.connStr = connstr; arch.GetList(out DocList, out ErrMsg); break; case "mom_orderdetail": arch = new U8.Interface.Bus.WebService.Biz.Archive.clsMom_orderdetail(); arch.connStr = connstr; arch.GetList(out DocList, out ErrMsg); break; case "mom_moallocate": arch = new U8.Interface.Bus.WebService.Biz.Archive.clsMom_moallocate(); arch.connStr = connstr; arch.GetList(out DocList, out ErrMsg); break; case "sfc_prouting": //标准工艺主表 arch = new U8.Interface.Bus.WebService.Biz.Archive.clsSfc_prouting(); arch.connStr = connstr; arch.GetList(out DocList, out ErrMsg); break; case "sfc_proutingdetail": //标准工艺子表 arch = new U8.Interface.Bus.WebService.Biz.Archive.clsSfc_proutingdetail(); arch.connStr = connstr; arch.GetList(out DocList, out ErrMsg); break; case "sfc_operation": //标准工序资料维护 主表 arch = new U8.Interface.Bus.WebService.Biz.Archive.clsSfc_operation(); arch.connStr = connstr; arch.GetList(out DocList, out ErrMsg); break; case "sfc_moroutingdetail": //生产订单工序资料子表 arch = new U8.Interface.Bus.WebService.Biz.Archive.clsSfc_operation(); arch.connStr = connstr; arch.GetList(out DocList, out ErrMsg); break; default: break; } if (arch == null) { DocList = null; ErrMsg = "没有相应档案的服务!"; return(false); } return(arch.GetList(out DocList, out ErrMsg)); } catch { DocList = null; ErrMsg = "WebService GetList方法出错"; return(false); } }
public int Update(string connstr, string ArchType, string KeyValue, string ErrorCode, string ErrorMsg, out string ErrMsg) { if (string.IsNullOrEmpty(ArchType)) { ErrMsg = "档案类型不能为空!"; return(-1); } try { switch (ArchType.ToLower()) { case "department": arch = new U8.Interface.Bus.WebService.Biz.Archive.clsDepartment(); break; case "person": arch = new U8.Interface.Bus.WebService.Biz.Archive.clsPerson(); break; case "inventory": arch = new U8.Interface.Bus.WebService.Biz.Archive.clsInventory(); break; case "inventoryclass": arch = new U8.Interface.Bus.WebService.Biz.Archive.clsInventoryClass(); break; case "computationunit": arch = new U8.Interface.Bus.WebService.Biz.Archive.clsComputationUnit(); break; case "mom_order": arch = new U8.Interface.Bus.WebService.Biz.Archive.clsMom_order(); break; case "mom_orderdetail": arch = new U8.Interface.Bus.WebService.Biz.Archive.clsMom_orderdetail(); break; case "mom_moallocate": arch = new U8.Interface.Bus.WebService.Biz.Archive.clsMom_moallocate(); break; case "sfc_prouting": arch = new U8.Interface.Bus.WebService.Biz.Archive.clsSfc_prouting(); break; case "sfc_proutingdetail": arch = new U8.Interface.Bus.WebService.Biz.Archive.clsSfc_proutingdetail(); break; default: break; } if (arch == null) { ErrMsg = "没有相应档案的服务!"; return(-1); } arch.connStr = connstr; return(arch.Update(connstr, KeyValue, ErrorCode, ErrorMsg, out ErrMsg)); } catch { ErrMsg = "WebService Update方法出错"; return(-1); } }