Ejemplo n.º 1
0
        private void getSizeRun(string DocTreeID, string osmDocTreeID)
        {
            if (!LoadDate())
            {
                return;
            }
            Cursor = Cursors.WaitCursor;

            T_StyleCodeInfoBLL stylecodeinfobll = new T_StyleCodeInfoBLL();

            this.dataGridViewSizeRun.DataSource = stylecodeinfobll.GetT_StyleCodeSizeRun(DocTreeID, osmDocTreeID);
            Cursor = Cursors.Default;
        }
Ejemplo n.º 2
0
        private void getPhoto(string DocTreeID)
        {
            if (!LoadDate())
            {
                return;
            }
            Cursor = Cursors.WaitCursor;

            T_StyleCodeInfoBLL stylecodeinfobll = new T_StyleCodeInfoBLL();

            // this.picStylePhoto.Image =
            ShowImg(stylecodeinfobll.getPhoto(DocTreeID));
            Cursor = Cursors.Default;
        }
Ejemplo n.º 3
0
        private void DoWork_CusUpdata(object sender, DoWorkEventArgs args)
        {
            BackgroundWorker worker = sender as BackgroundWorker;
            //  T_StyleCodeInfo[] styleinfo = new T_StyleCodeInfo();
            T_StyleCodeInfo styleinfo = new T_StyleCodeInfo();

            //using (TransactionScope ts = new TransactionScope())
            //{
            for (int i = 0; i < StyleCodeInfodataGridView.RowCount; i++)
            {
                //  this.Invoke((EventHandler)(delegate
                // {
                //写入语句
                //SQLBALLCOPY
                styleinfo.osmDocTreeID = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["osmDocTreeID"].Value);
                styleinfo.DocTreeID    = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["DocTreeID"].Value);
                if (StyleCodeInfodataGridView.Rows[i].Cells["DeliverDate"].Value != null)
                {
                    styleinfo.DeliverDate = Convert.ToDateTime(StyleCodeInfodataGridView.Rows[i].Cells["DeliverDate"].Value);
                }

                styleinfo.doccode          = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["doccode"].Value);
                styleinfo.OrderDate        = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["OrderDate"].Value);
                styleinfo.SessionType      = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["SessionType"].Value);
                styleinfo.CCount           = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["CCount"].Value);
                styleinfo.TotalCount       = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["TotalCount"].Value);
                styleinfo.ExportPrice      = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["ExportPrice"].Value);
                styleinfo.MonetaryUnit     = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["MonetaryUnit"].Value);
                styleinfo.MonetaryUnitname = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["MonetaryUnitname"].Value);

                styleinfo.FactoryID       = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["FactoryID"].Value);
                styleinfo.FactoryName     = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["FactoryName"].Value);
                styleinfo.WarehouseID     = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["WarehouseID"].Value);
                styleinfo.Warehouse       = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["Warehouse"].Value);
                styleinfo.CustomStyleCode = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["CustomStyleCode"].Value);
                styleinfo.CutNo           = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["CutNo"].Value);
                styleinfo.CustomID        = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["CustomID"].Value);
                styleinfo.CustomName      = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["CustomName"].Value);
                styleinfo.CustomBuyer     = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["CustomBuyer"].Value);
                styleinfo.CustomBuyName   = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["CustomBuyName"].Value);

                styleinfo.StyleID          = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["StyleID"].Value);
                styleinfo.Code             = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["Code"].Value);
                styleinfo.Name             = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["Name"].Value);
                styleinfo.SingleTurn       = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["SingleTurn"].Value);
                styleinfo.CustomPO         = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["CustomPO"].Value);
                styleinfo.ManufactureOrder = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["ManufactureOrder"].Value);
                styleinfo.StyleNumber      = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["StyleNumber"].Value);
                styleinfo.ColorID          = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["ColorID"].Value);
                styleinfo.ColorName        = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["ColorName"].Value);
                styleinfo.Editionhandle    = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["Editionhandle"].Value);

                styleinfo.ModelNo   = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["ModelNo"].Value);
                styleinfo.CuttingNo = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["CuttingNo"].Value);
                styleinfo.RBcode    = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["RBcode"].Value);
                styleinfo.RBcolor   = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["RBcolor"].Value);
                styleinfo.MDcode    = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["MDcode"].Value);
                styleinfo.MDcolor   = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["MDcolor"].Value);
                styleinfo.ddlcode   = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["ddlcode"].Value);
                styleinfo.ddwcode   = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["ddwcode"].Value);
                styleinfo.ddqcode   = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["ddqcode"].Value);
                styleinfo.ddhcode   = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["ddhcode"].Value);

                styleinfo.ddscode = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["ddscode"].Value);
                styleinfo.aocode  = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["aocode"].Value);
                styleinfo.towcode = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["towcode"].Value);
                if (StyleCodeInfodataGridView.Rows[i].Cells["ShipMentDate"].Value != null)
                {
                    styleinfo.ShipMentDate = Convert.ToDateTime(StyleCodeInfodataGridView.Rows[i].Cells["ShipMentDate"].Value);
                }
                styleinfo.ExportArea       = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["ExportArea"].Value);
                styleinfo.AimArea          = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["AimArea"].Value);
                styleinfo.ShipType         = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["ShipType"].Value);
                styleinfo.ShipTypeName     = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["ShipTypeName"].Value);
                styleinfo.Memo             = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["Memo"].Value);
                styleinfo.CustomClothBrand = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["CustomClothBrand"].Value);
                styleinfo.logocode         = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["logocode"].Value);

                styleinfo.logoname         = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["logoname"].Value);
                styleinfo.OrderDocType     = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["OrderDocType"].Value);
                styleinfo.OrderDocTypeName = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["OrderDocTypeName"].Value);
                styleinfo.DesignTypeID     = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["DesignTypeID"].Value);
                styleinfo.DesignTypeName   = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["DesignTypeName"].Value);
                styleinfo.GoodsType        = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["GoodsType"].Value);
                styleinfo.GoodsTypeName    = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["GoodsTypeName"].Value);
                styleinfo.ID        = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["ID"].Value);
                styleinfo.StyleNo   = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["StyleNo"].Value);
                styleinfo.PriceItem = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["PriceItem"].Value);

                styleinfo.PriceItemName   = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["PriceItemName"].Value);
                styleinfo.BalanceType     = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["BalanceType"].Value);
                styleinfo.BalanceTypeName = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["BalanceTypeName"].Value);
                styleinfo.CountryName     = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["CountryName"].Value);
                styleinfo.CountryNum      = Convert.ToString(StyleCodeInfodataGridView.Rows[i].Cells["CountryNum"].Value);
                // SetTextMessage((i + 1) * 100 / StyleCodeInfodataGridView.RowCount);
                //    using (TransactionScope ts = new TransactionScope())//分布式事务  有错误
                //  {
                T_StyleCodeInfoBLL stylecodeinfobll = new T_StyleCodeInfoBLL();
                // Guid guid = Guid.NewGuid();
                string guidstr = stylecodeinfobll.GetCountByosmDocTreeID(styleinfo.CustomStyleCode);
                if (guidstr.Length <= 0)//保存前检查是否已有记录
                {
                    Guid guid = Guid.NewGuid();
                    stylecodeinfobll.updataFromDV(styleinfo, guid);   //写订单明细
                                                                      //写sizerun
                    string DocTreeID;
                    string osmDocTreeID;
                    DocTreeID    = this.StyleCodeInfodataGridView["DocTreeID", i].Value.ToString();    //第1列为ID 取值去查SIZERUN
                    osmDocTreeID = this.StyleCodeInfodataGridView["osmDocTreeID", i].Value.ToString(); //第0列为ID 取值去查SIZERUN
                    stylecodeinfobll.updataFromSize(Convert.ToString(guid), osmDocTreeID);
                    //    ts.Complete();
                }
                else
                {
                    // Guid guid = styleinfo.;
                    stylecodeinfobll.updataFromsinfoDV(styleinfo, guidstr);   //写订单明细
                                                                              //写sizerun
                    string DocTreeID;
                    string osmDocTreeID;
                    DocTreeID    = this.StyleCodeInfodataGridView["DocTreeID", i].Value.ToString();    //第1列为ID 取值去查SIZERUN
                    osmDocTreeID = this.StyleCodeInfodataGridView["osmDocTreeID", i].Value.ToString(); //第0列为ID 取值去查SIZERUN
                    stylecodeinfobll.updataFromSize(guidstr, osmDocTreeID);
                    //     ts.Complete();
                }


                //  }

                if (worker.CancellationPending)
                {
                    args.Cancel = true;
                    break;
                }
                else
                {
                    worker.ReportProgress(i * 100 / StyleCodeInfodataGridView.RowCount);
                    Thread.Sleep(0);
                }

                //}
                //if (!args.Cancel)   //没有取消   写入库
                //{
                //    ts.Complete();
                //}

                // }));
                //     Thread.Sleep(100);//显示出来
            }
        }
Ejemplo n.º 4
0
        private void LoadDate(List <string> whereList, List <string> whereListText, string type)
        {
            Cursor = Cursors.WaitCursor;
            T_StyleCodeInfoBLL stylecodeinfobll = new T_StyleCodeInfoBLL();

            T_StyleCodeInfo[] StyleCodeInfos = stylecodeinfobll.GetStyleCodeInfos(whereList, whereListText, type);
            int k = 0;

            if (StyleCodeInfos != null)
            {
                k = StyleCodeInfos.Count();
            }
            if (k <= 0)
            {
                MessageBox.Show("没有数据,请更改查询条件!");
                Cursor = Cursors.Default;
                return;
            }

            this.StyleCodeInfodataGridView.DataSource = StyleCodeInfos;


            this.StyleCodeInfodataGridView.Rows[k - 1].Selected = true;
            //this.StyleCodeInfodataGridView.FirstDisplayedScrollingRowIndex = k-1;
            this.StyleCodeInfodataGridView.FirstDisplayedScrollingRowIndex = k - 1;

            string DocTreeID;
            string osmDocTreeID;

            DocTreeID    = this.StyleCodeInfodataGridView["DocTreeID", k - 1].Value.ToString();    //第1列为ID 取值去查SIZERUN
            osmDocTreeID = this.StyleCodeInfodataGridView["osmDocTreeID", k - 1].Value.ToString(); //第0列为ID 取值去查SIZERUN
            // str = e.ColumnIndex.ToString();
            getSizeRun(DocTreeID, osmDocTreeID);

            //  this.StyleCodeInfodataGridView.ReadOnly = true;
            this.StyleCodeInfodataGridView.AlternatingRowsDefaultCellStyle.BackColor = System.Drawing.ColorTranslator.FromHtml("#D3D3D3");

            if (type == "btnsearchAll")
            {
                this.StyleCodeInfodataGridView.Columns["Guid"].HeaderText = "Guid";
                this.StyleCodeInfodataGridView.Columns["Guid"].Visible    = false;
            }


            this.StyleCodeInfodataGridView.Columns["osmDocTreeID"].HeaderText = "鞋型库订单号";
            this.StyleCodeInfodataGridView.Columns["osmDocTreeID"].Visible    = false;
            this.StyleCodeInfodataGridView.Columns["DocTreeID"].Visible       = false;
            this.StyleCodeInfodataGridView.Columns["DeliverDate"].HeaderText  = "接单日期";
            this.StyleCodeInfodataGridView.Columns["doccode"].HeaderText      = "订单合同号";
            this.StyleCodeInfodataGridView.Columns["OrderDate"].HeaderText    = "订单年月";
            this.StyleCodeInfodataGridView.Columns["SessionType"].HeaderText  = "季节号";

            this.StyleCodeInfodataGridView.Columns["CCount"].HeaderText           = "订单总双数";
            this.StyleCodeInfodataGridView.Columns["TotalCount"].HeaderText       = "SIZI总数";
            this.StyleCodeInfodataGridView.Columns["ExportPrice"].HeaderText      = "单价";
            this.StyleCodeInfodataGridView.Columns["MonetaryUnit"].Visible        = false;
            this.StyleCodeInfodataGridView.Columns["MonetaryUnitname"].HeaderText = "币种";
            this.StyleCodeInfodataGridView.Columns["FactoryID"].Visible           = false;
            this.StyleCodeInfodataGridView.Columns["FactoryName"].HeaderText      = "生产工厂";
            this.StyleCodeInfodataGridView.Columns["WarehouseID"].Visible         = false;
            this.StyleCodeInfodataGridView.Columns["Warehouse"].HeaderText        = "承接仓库";
            this.StyleCodeInfodataGridView.Columns["CustomStyleCode"].HeaderText  = "指令号";
            this.StyleCodeInfodataGridView.Columns["CutNo"].HeaderText            = "ORDER NO/PO NO";
            this.StyleCodeInfodataGridView.Columns["CustomID"].Visible            = false;
            this.StyleCodeInfodataGridView.Columns["CustomName"].HeaderText       = "客户";
            this.StyleCodeInfodataGridView.Columns["CustomBuyer"].Visible         = false;
            this.StyleCodeInfodataGridView.Columns["CustomBuyName"].HeaderText    = "客户买主";
            this.StyleCodeInfodataGridView.Columns["StyleID"].HeaderText          = "鞋型ID";
            this.StyleCodeInfodataGridView.Columns["StyleID"].Visible             = false;
            this.StyleCodeInfodataGridView.Columns["Code"].HeaderText             = "工厂型体";

            this.StyleCodeInfodataGridView.Columns["Name"].HeaderText       = "客户型体";
            this.StyleCodeInfodataGridView.Columns["SingleTurn"].HeaderText = "客户订单号";
            this.StyleCodeInfodataGridView.Columns["CustomPO"].HeaderText   = "客户订单号";
            this.StyleCodeInfodataGridView.Columns["CustomPO"].Visible      = false;


            this.StyleCodeInfodataGridView.Columns["ManufactureOrder"].HeaderText = "LOTNO";
            this.StyleCodeInfodataGridView.Columns["StyleNumber"].HeaderText      = "客户鞋名";
            this.StyleCodeInfodataGridView.Columns["ColorID"].Visible             = false;
            this.StyleCodeInfodataGridView.Columns["ColorName"].HeaderText        = "颜色";
            this.StyleCodeInfodataGridView.Columns["Editionhandle"].HeaderText    = "楦头编号";
            this.StyleCodeInfodataGridView.Columns["ModelNo"].HeaderText          = "大底编号";
            this.StyleCodeInfodataGridView.Columns["CuttingNo"].HeaderText        = "后跟编号";

            this.StyleCodeInfodataGridView.Columns["RBcode"].HeaderText  = "RB模号";
            this.StyleCodeInfodataGridView.Columns["RBcolor"].HeaderText = "RB颜色";
            this.StyleCodeInfodataGridView.Columns["MDcode"].HeaderText  = "MD模号";

            this.StyleCodeInfodataGridView.Columns["MDcolor"].HeaderText = "MD颜色";
            this.StyleCodeInfodataGridView.Columns["ddlcode"].HeaderText = "大底饰片(内腰)";
            this.StyleCodeInfodataGridView.Columns["ddwcode"].HeaderText = "大底饰片(外腰)";

            this.StyleCodeInfodataGridView.Columns["ddqcode"].HeaderText = "大底饰片(前掌)";
            this.StyleCodeInfodataGridView.Columns["ddhcode"].HeaderText = "大底饰片(后跟)";
            this.StyleCodeInfodataGridView.Columns["ddscode"].HeaderText = "大底射出片";

            this.StyleCodeInfodataGridView.Columns["aocode"].HeaderText       = "凹槽";
            this.StyleCodeInfodataGridView.Columns["towcode"].HeaderText      = "二次工艺";
            this.StyleCodeInfodataGridView.Columns["ShipMentDate"].HeaderText = "客户交期";

            this.StyleCodeInfodataGridView.Columns["ExportArea"].HeaderText = "出货港";
            this.StyleCodeInfodataGridView.Columns["AimArea"].HeaderText    = "目的地";

            this.StyleCodeInfodataGridView.Columns["ShipType"].HeaderText     = "运输方式ID";
            this.StyleCodeInfodataGridView.Columns["ShipType"].Visible        = false;
            this.StyleCodeInfodataGridView.Columns["ShipTypeName"].HeaderText = "运输方式";

            this.StyleCodeInfodataGridView.Columns["Memo"].HeaderText             = "交期備注";
            this.StyleCodeInfodataGridView.Columns["CustomClothBrand"].HeaderText = "LOGO";
            this.StyleCodeInfodataGridView.Columns["logocode"].HeaderText         = "LOGO编码";

            this.StyleCodeInfodataGridView.Columns["logoname"].HeaderText  = "LOGO名称";
            this.StyleCodeInfodataGridView.Columns["OrderDocType"].Visible = false;

            this.StyleCodeInfodataGridView.Columns["OrderDocTypeName"].HeaderText = "订单类型";

            this.StyleCodeInfodataGridView.Columns["DesignTypeID"].Visible      = false;
            this.StyleCodeInfodataGridView.Columns["DesignTypeName"].HeaderText = "鞋款做法";
            this.StyleCodeInfodataGridView.Columns["GoodsType"].Visible         = false;
            this.StyleCodeInfodataGridView.Columns["GoodsTypeName"].HeaderText  = "产品类型";
            this.StyleCodeInfodataGridView.Columns["ID"].HeaderText             = "ID";
            this.StyleCodeInfodataGridView.Columns["ID"].Visible = false;

            this.StyleCodeInfodataGridView.Columns["StyleNo"].HeaderText = "款序";
            // this.StyleCodeInfodataGridView.Columns["LogoLibrary"].HeaderText = "LOGO库";
            this.StyleCodeInfodataGridView.Columns["PriceItem"].Visible        = false;
            this.StyleCodeInfodataGridView.Columns["PriceItemName"].HeaderText = "交易条件";

            this.StyleCodeInfodataGridView.Columns["BalanceType"].Visible        = false;
            this.StyleCodeInfodataGridView.Columns["BalanceTypeName"].HeaderText = "付款方式";
            //  this.StyleCodeInfodataGridView.Columns["IsNeedQuote"].HeaderText = "IsNeedQuote";
            // this.StyleCodeInfodataGridView.Columns["IsSinglePrice"].HeaderText = "IsSinglePrice";

            //   this.StyleCodeInfodataGridView.Columns["IsSingleCostPrice"].HeaderText = "IsSingleCostPrice";
            //  this.StyleCodeInfodataGridView.Columns["IsSingleShowPrice"].HeaderText = "IsSingleShowPrice";
            this.StyleCodeInfodataGridView.Columns["CountryName"].HeaderText = "国家名称";

            this.StyleCodeInfodataGridView.Columns["CountryNum"].HeaderText = "国家代码";
            //  this.StyleCodeInfodataGridView.Columns["ActualCustomPerCount"].HeaderText = "ActualCustomPerCount";

            //总订单数
            int j = 0;

            for (int i = 0; i < k; i++)
            {
                j = j + Convert.ToInt32(StyleCodeInfos[i].CCount);
            }
            txtPOCount.Text = j.ToString();

            //总型体数 Code
            j = 0;
            string strCode = "0";

            for (int i = 0; i < k; i++)
            {
                if (strCode == "0")
                {
                    strCode = StyleCodeInfos[i].Code;
                    string[] s = strCode.Split(new char[] { '/' });
                    strCode = s[0];
                }

                if (strCode != StyleCodeInfos[i].Code.Split(new char[] { '/' })[0])
                {
                    j++;
                    strCode = StyleCodeInfos[i].Code.Split(new char[] { '/' })[0];
                }
                txtCodeCount.Text = j.ToString();
            }
            //总交期数 ShipMentDate
            // DateTime[] ShipMentDates;
            List <DateTime> listArr       = new List <DateTime>();
            List <string>   ShipMentDates = new List <string>();
            List <int>      ShipCounts    = new List <int>();
            int             ShipCount     = 0;

            j = 0;
            for (int i = 0; i < k; i++)
            {
                if (StyleCodeInfos[i].ShipMentDate == null || StyleCodeInfos[i].ShipMentDate.ToString().Length <= 0)
                {
                    StyleCodeInfos[i].ShipMentDate = Convert.ToDateTime("2014-01");
                }
                DateTime ShipMentDate = (DateTime)StyleCodeInfos[i].ShipMentDate;
                if (listArr.Count() <= 0)
                {
                    listArr.Add(ShipMentDate);
                    ShipMentDates.Add(ShipMentDate.ToString("d"));
                    ShipCounts.Add(ShipCount);
                    if (StyleCodeInfos[i].CCount == null)
                    {
                        ShipCounts[i] = ShipCount + 0;
                    }
                    ShipCounts[i] = ShipCount + Convert.ToInt32(StyleCodeInfos[i].CCount);
                }
                if (listArr[j] == ShipMentDate)
                {
                    ShipCounts[j] = ShipCount + Convert.ToInt32(StyleCodeInfos[i].CCount);
                }
                else
                if (listArr[j] != ShipMentDate)
                {
                    listArr.Add(ShipMentDate);
                    ShipMentDates.Add(ShipMentDate.ToString("d"));
                    ShipCounts.Add(ShipCount);
                    if (StyleCodeInfos[i].CCount == null)
                    {
                        ShipCounts[j] = ShipCount + 0;
                    }
                    ShipCounts[j] = ShipCount + Convert.ToInt32(StyleCodeInfos[i].CCount);
                    j++;
                }
                //   }
            }
            ;
            txtShipMentDateCount.Text = listArr.Count.ToString();
            for (int l = 0; l < listArr.Count; l++)
            {
                btnIMPEXCEL.Text = btnIMPEXCEL.Text + " | " + ShipMentDates[l].ToString() + " _ " + ShipCounts[l].ToString();
            }

            Cursor = Cursors.Default;
        }