예제 #1
0
        /// <summary>
        /// 验证销售订单号
        /// </summary>
        /// <param name="csocode">销售订单号</param>
        /// <param name="csocode_id">id号</param>
        /// <param name="errMsg"></param>
        /// <returns></returns>
        public static bool VerifySO_SO(string csocode, out Model.DispatchList dispatchlist, out string errMsg)
        {
            Common co = Common.GetInstance();

            errMsg       = "";
            dispatchlist = null;
            DataSet list = null;

            co.Service.VerifySO_SO(csocode, Common.CurrentUser.ConnectionString, out list, out errMsg);
            if (errMsg != "")
            {
                throw new Exception(errMsg);
            }
            else
            {
                if (list.Tables[0] != null && list.Tables[0].Rows.Count > 0)
                {
                    dispatchlist                = new Model.DispatchList(list);
                    dispatchlist.U8Details      = new List <Model.DispatchDetail>();
                    dispatchlist.OperateDetails = new List <Model.DispatchDetail>();
                    DataSet ds     = null;
                    int     int_ds = GetSO_SODetails(dispatchlist.csoid, out ds, out errMsg);
                    if (errMsg != "" && int_ds != 0)
                    {
                        throw new Exception(errMsg);
                        return(false);
                    }
                    DispatchDetail dd = null;
                    foreach (DataRow dr in ds.Tables[0].Rows)
                    {
                        dd             = new DispatchDetail(dr);
                        dd.ccusname    = dispatchlist.ccusname;    //客户名称
                        dd.ccusabbname = dispatchlist.ccusabbname; //客户简称
                        dispatchlist.U8Details.Add(dd);
                    }
                    return(true);
                }
                else
                {
                    errMsg = "验证销售订单号出错";
                    return(false);
                }
            }
        }
예제 #2
0
 public bool UpdateDispatchListExpressOrder(string connectionString, Model.DispatchList data)
 {
     return(ExpressOrderProcess.UpdateDispatchListExpressOrder(connectionString, data));
 }