Exemplo n.º 1
0
        public void Initialize()
        {
            try
            {
                using (ProxyBE p = new ProxyBE())
                {
                    SearchOrder2CabinetArgs args = new SearchOrder2CabinetArgs();
                    args.OrderBy  = "[Sequence]";
                    args.OrderIDs = new List <Guid>()
                    {
                        this.OrderID
                    };
                    SearchResult sr    = p.Client.SearchOrder2Cabinet(CGlobal.SenderUser, args);
                    int          count = sr.DataSet.Tables[0].Select("CabinetStatus='N'").Length;

                    Order order = p.Client.GetOrder(CGlobal.SenderUser, OrderID);

                    this.tvCabinet.Nodes.Clear();
                    TreeNode root = new TreeNode();
                    root.Text = string.Format("订单号:{0};已完成:{1};未完成:{2};取消:{3}", order.OrderNo, sr.DataSet.Tables[0].Select("CabinetStatus='F'").Length, sr.DataSet.Tables[0].Select("CabinetStatus='N'").Length, sr.DataSet.Tables[0].Select("CabinetStatus='C'").Length);
                    foreach (DataRow row in sr.DataSet.Tables[0].Rows)
                    {
                        TreeNode subNode = new TreeNode();
                        subNode.Text = string.Format("{0}【{1},{2},{3},{4}】 -- {5}", row["CabinetName"], row["Size"], row["Color"], row["MaterialStyle"], row["MaterialCategory"], GetStatus(row["CabinetStatus"].ToString()));
                        root.Nodes.Add(subNode);
                    }
                    tvCabinet.Nodes.Add(root);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Exemplo n.º 2
0
 public SearchResult SearchOrder2CabinetLogs(Sender sender, SearchOrder2CabinetArgs args)
 {
     try
     {
         using (ObjectProxy op = new ObjectProxy())
         {
             return(op.SearchOrder2CabinetLogs(args));
         }
     }
     catch (Exception ex)
     {
         PLogger.LogError(ex);
         throw ex;
     }
 }
Exemplo n.º 3
0
        public DataSet GetCommonLabelDataSource(Guid CabinetID, string CategoryName, string LogoFile)
        {
            DataSet ds = new DataSet("tbPackageDataTable");

            using (ProxyBE p = new ProxyBE())
            {
                Order2Cabinet           cabinet = p.Client.GetOrder2Cabinet(CGlobal.SenderUser, CabinetID);
                SearchOrder2CabinetArgs args    = new SearchOrder2CabinetArgs();
                args.OrderIDs = new List <Guid> {
                    cabinet.OrderID
                };
                //args.CabinetName = cabinet.CabinetName;
                args.CabinetID = CabinetID;
                SearchResult sr = p.Client.SearchOrder2Cabinet(CGlobal.SenderUser, args);
                if (sr.Total == 0)
                {
                    return(ds);
                }
                #region 100*70的条码

                DataTable tb = new DataTable();
                tb.Columns.Add(new DataColumn("OrderNo", typeof(string)));
                tb.Columns.Add(new DataColumn("OutOrderNo", typeof(string)));
                tb.Columns.Add(new DataColumn("PurchaseNo", typeof(string)));
                tb.Columns.Add(new DataColumn("CustomerName", typeof(string)));
                tb.Columns.Add(new DataColumn("Address", typeof(string)));
                tb.Columns.Add(new DataColumn("LinkMan", typeof(string)));
                tb.Columns.Add(new DataColumn("Mobile", typeof(string)));
                tb.Columns.Add(new DataColumn("CabinetName", typeof(string)));
                tb.Columns.Add(new DataColumn("MaterialStyle", typeof(string)));
                tb.Columns.Add(new DataColumn("Size", typeof(string)));
                tb.Columns.Add(new DataColumn("Color", typeof(string)));
                tb.Columns.Add(new DataColumn("Logo", typeof(byte[])));
                tb.Columns.Add(new DataColumn("PrintDate", typeof(string)));
                tb.Columns.Add(new DataColumn("Remark", typeof(string)));
                tb.Columns.Add(new DataColumn("CategoryName", typeof(string)));

                DataRow row = sr.DataSet.Tables[0].Rows[0];

                string[] c = CategoryName.Split(',');
                foreach (string s in c)
                {
                    DataRow newRow = tb.NewRow();
                    newRow["OrderNo"]       = row["OrderNo"];
                    newRow["OutOrderNo"]    = row["OutOrderNo"];
                    newRow["PurchaseNo"]    = row["PurchaseNo"];
                    newRow["CustomerName"]  = row["CustomerName"];
                    newRow["Address"]       = row["Address"];
                    newRow["LinkMan"]       = row["LinkMan"];
                    newRow["Mobile"]        = row["Mobile"];
                    newRow["CabinetName"]   = row["CabinetName"];
                    newRow["Size"]          = row["Size"];
                    newRow["Color"]         = row["Color"];
                    newRow["MaterialStyle"] = row["MaterialStyle"];
                    newRow["Address"]       = row["Province"].ToString() + row["City"].ToString() + row["Address"].ToString();
                    newRow["Logo"]          = getLogoFile(LogoFile);
                    newRow["PrintDate"]     = DateTime.Now.ToString("yyyy年MM月dd日");
                    newRow["Remark"]        = "";
                    newRow["CategoryName"]  = s;
                    tb.Rows.Add(newRow);
                }

                ds.Tables.Add(tb);
                #endregion
            }
            return(ds);
        }