using System; using System.Collections.Generic; using System.Text; using System.Data; using Stone.DataService.Biz.Info; using Stone.DataService.Biz.Bill; using Stone.DataService.Biz.BizPublic; namespace Stone.DataService.Biz { public class CommandFactory { public static DataSet ServiceData(DataSet dsCommand, DataSet dsData) { System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("zh-CN"); //if (DateTime.Now > new DateTime(2012, 11, 20)) //{ // throw new Exception("未知异常 339"); //} F_BillVerify f_BillVerify = null; F_BillVDA f_BillVDA = null; F_BillAsn f_BillAsn = null; //F_BillSort f_BillSort = null; Command cmd = new Command(dsCommand); switch (cmd.Cmd) { #region 基础信息 case "USER_LIST": return F_User.UserList(cmd); case "USER_LOGIN": return F_User.UserLogin(cmd); case "PRODUCT_LIST": return F_Product.GetData(); #endregion #region 校验单 case "BILL_NEW_VERIFY": f_BillVerify = new F_BillVerify(); return f_BillVerify.BillNew(cmd); case "BILL_SUBMIT_VERIFY": f_BillVerify = new F_BillVerify(); f_BillVerify.BillSubmit(dsData); return null; #endregion #region VDA小件 case "BILL_NEW_VDA": f_BillVDA = new F_BillVDA(); return f_BillVDA.BillNew(cmd); case "BILL_SCAN_VDA": f_BillVDA = new F_BillVDA(); return f_BillVDA.PackageScan(cmd); case"BILL_DEL_VDA": f_BillVDA = new F_BillVDA(); f_BillVDA.PackageDel(cmd); return null; case "BILL_SUBMIT_VDA": f_BillVDA = new F_BillVDA(); f_BillVDA.BillSubmit(cmd, dsData); return null; #endregion #region 发货单扫描_old case "BILL_SUBMIT_SHIPBILL": return F_BillShip.Submit(cmd, dsData); #endregion #region ASNBill case "BILL_NEW_ASNBILL": f_BillAsn = new F_BillAsn(); return f_BillAsn.BillNew(cmd); case "BILL_SUBMIT_ASNBILL": f_BillAsn = new F_BillAsn(); f_BillAsn.BillSubmit(cmd, dsData); return null; #endregion #region STD校验 case "VDA_CHECK_SUBMIT": return F_STD_Check.VDA_Check_Submit(cmd); #endregion } throw new Exception("未获取到任何指定的数据!"); } } }