Exemplo n.º 1
0
        private void ProcessData()
        {
            DataTable dt = new Express.BLL.OrderView().GetList(autosearch).Tables[0];

            TotalProcessRecord = dt.Rows.Count;
            foreach (DataRow item in dt.Rows)
            {
                Express.Model.OrderInfo model = new Express.Model.OrderInfo();
                model.OrderNo = item["orderno"].ToString();
                model.Id      = int.Parse(item["id"].ToString());
                processmodel.Process(model);
                SetprocessState();
            }
            StopAutoCheck();
        }
Exemplo n.º 2
0
        private void LoadData()
        {
            this.anpageinfo.Refresh();
            gvInfo.Rows.Clear();
            int pagesize = PageSize;

            DataTable dt       = new Express.BLL.OrderView().GetListByPage(SearchCondition(), "id", pagesize, anpageinfo.PageIndex).Tables[0];
            int       rowCount = dt.Rows.Count;

            if (rowCount > 0)
            {
                gvInfo.Rows.Add(rowCount);
            }
            rowCount = 0;
            foreach (DataRow item in dt.Rows)
            {
                gvInfo.Rows[rowCount].Cells[0].Value = item["id"];
                gvInfo.Rows[rowCount].Cells[1].Value = (rowCount + 1);
                gvInfo.Rows[rowCount].Cells[2].Value = item["orderno"];
                gvInfo.Rows[rowCount].Cells[3].Value = item["Daterecived"];
                gvInfo.Rows[rowCount].Cells[4].Value = item["pername"];
                gvInfo.Rows[rowCount].Cells[5].Value = item["cusname"];
                gvInfo.Rows[rowCount].Cells[6].Value = item["Reciver"];

                gvInfo.Rows[rowCount].Cells[7].Value  = item["Tel"];
                gvInfo.Rows[rowCount].Cells[8].Value  = item["Provice"];
                gvInfo.Rows[rowCount].Cells[9].Value  = item["City"];
                gvInfo.Rows[rowCount].Cells[10].Value = item["Area"];
                gvInfo.Rows[rowCount].Cells[11].Value = item["Address"];

                gvInfo.Rows[rowCount].Cells[12].Value = item["Remark"];
                Color foreColor = Color.Black;
                gvInfo.Rows[rowCount].Cells[13].Value = ConvertOrderState(Convert.ToInt32(item["OState"]), ref foreColor);
                gvInfo.Rows[rowCount].Cells[14].Value = item["OState"];

                gvInfo.Rows[rowCount].Cells[15].Value = item["NewContractdate"];
                gvInfo.Rows[rowCount].Cells[16].Value = item["Contractor"];
                gvInfo.Rows[rowCount].Cells[17].Value = item["ORStateName"];
                gvInfo.Rows[rowCount].Cells[18].Value = item["Paream1"];
                gvInfo.Rows[rowCount].Cells[19].Value = item["Paream2"];
                if (!string.IsNullOrEmpty(item["Paream8"].ToString()))
                {
                    gvInfo.Rows[rowCount].Cells[20].Value = int.Parse(item["Paream8"].ToString()) * 1M / 100M;
                }
                this.gvInfo.Rows[rowCount].DefaultCellStyle.ForeColor = foreColor;
                gvInfo.Rows[rowCount].Cells[21].Value = item["Paream4"];                                                                                        //揽件员
                gvInfo.Rows[rowCount].Cells[22].Value = item["Paream6"].ToString() == "1"?"是":"否";                                                              //是否退回件
                gvInfo.Rows[rowCount].Cells[23].Value = string.IsNullOrEmpty(item["Paream7"].ToString()) ?0: int.Parse(item["Paream7"].ToString()) * 1d / 100d; //快件重量;
                gvInfo.Rows[rowCount].Cells[24].Value = item["Paream15"].ToString();
                gvInfo.Rows[rowCount].Cells[25].Value = item["Paream13"].ToString();
                gvInfo.Rows[rowCount].Cells[26].Value = item["Paream14"].ToString();
                gvInfo.Rows[rowCount].Cells[27].Value = item["Paream0"].ToString();
                gvInfo.Rows[rowCount].Cells[28].Value = item["Paream9"].ToString();
                gvInfo.Rows[rowCount].Cells[29].Value = item["Paream10"].ToString();
                gvInfo.Rows[rowCount].Cells[30].Value = item["Paream11"].ToString();
                gvInfo.Rows[rowCount].Cells[31].Value = item["Paream12"].ToString();

                if (item["Paream10"].ToString().Contains("("))
                {
                    gvInfo.Rows[rowCount].Cells[32].Value = item["Paream10"].ToString().Substring(0, item["Paream10"].ToString().IndexOf("("));
                }
                if (item["Paream11"].ToString().Contains("("))
                {
                    gvInfo.Rows[rowCount].Cells[33].Value = item["Paream11"].ToString().Substring(0, item["Paream11"].ToString().IndexOf("("));
                }

                rowCount++;
            }
        }