예제 #1
0
 public DataTable LedShowInfo()
 {
     using (PersistentManager pm = new PersistentManager())
     {
         LedShowDao dao = new LedShowDao();
         dao.SetPersistentManager(pm);
         return dao.LedShowInfo();
     }
 }
예제 #2
0
 /// <summary>
 /// 进入配送中心车辆信息
 /// </summary>
 /// <returns></returns>
 public DataTable getRegistrationInfos(string strRequires)
 {
     using (PersistentManager pm = new PersistentManager())
     {
         LedShowDao dao = new LedShowDao();
         dao.SetPersistentManager(pm);
         return dao.getRegistrationInfos(strRequires);
     }
 }
예제 #3
0
파일: LedShowBLL.cs 프로젝트: wckj/wc001
 /// <summary>
 /// 更改报警次数
 /// </summary>
 /// <param name="requires"></param>
 /// <returns></returns>
 public void updateAlarmnum(string requires)
 {
     using (PersistentManager pm = new PersistentManager())
     {
         LedShowDao dao = new LedShowDao();
         dao.SetPersistentManager(pm);
         dao.updateAlarmnum(requires);
     }
 }
예제 #4
0
파일: LedShowBLL.cs 프로젝트: wckj/wc001
 /// <summary>
 /// 待卸货总量
 /// </summary>
 /// <param name="strRequires"></param>
 /// <returns></returns>
 public int workTaskQty(string strRequires)
 {
     using (PersistentManager pm = new PersistentManager())
     {
         LedShowDao dao = new LedShowDao();
         dao.SetPersistentManager(pm);
         return dao.workTaskQty(strRequires);
     }
 }
예제 #5
0
        private void Run()
        {
            try
            {
                //lblTimeTxt.Text = DateTime.Now.ToString("yyyy年MM月dd日hh时mm分");
                lblTimeTxt.Text = DateTime.Now.ToString();
                using (PersistentManager pm = new PersistentManager("DefaultConnection"))
                {

                    TimeDao timeshow = new TimeDao();
                    timeshow.SetPersistentManager(pm);
                    //一号
                    string sortNo = Convert.ToString("one");

                    DataTable infoTable = timeshow.FindSortTime(sortNo);
                    RefreshAgv refreshAgv = new RefreshAgv();
                    int nu = 0;
                    RefreshData2 re = new RefreshData2();
                    if (infoTable.Rows.Count > 1)
                    {
                        nu = Convert.ToInt32(infoTable.Rows[0]["Times"]);

                        double a = nu * 0.0 / 3600;
                        re.CompleteQuantity2 = Convert.ToInt32(infoTable.Rows[0]["QUANTITY"]) / Convert.ToInt32(a);
                    }
                    else
                    {
                        re.CompleteQuantity2 = 0;
                    }

                }

                using (PersistentManager pm = new PersistentManager("DefaultConnection2"))
                {
                    LedShowDao ledShowDao = new LedShowDao();
                    ledShowDao.SetPersistentManager(pm);
                    string sortNo = Convert.ToString("all");

                    DataTable infoTable = ledShowDao.FindOrderInfo(sortNo);
                    RefreshData refreshData = new RefreshData();
                    refreshData.TotalCustomer = Convert.ToInt32(infoTable.Rows[0]["CUSTOMERNUM"]);
                    refreshData.TotalRoute = Convert.ToInt32(infoTable.Rows[0]["ROUTENUM"]);
                    refreshData.TotalQuantity = Convert.ToInt32(infoTable.Rows[0]["QUANTITY"]);

                    //已分拣
                    infoTable = ledShowDao.FindOrderInfo("");
                    refreshData.CompleteCustomer = Convert.ToInt32(infoTable.Rows[0]["CUSTOMERNUM"]);
                    refreshData.CompleteRoute = Convert.ToInt32(infoTable.Rows[0]["ROUTENUM"]);
                    refreshData.CompleteQuantity = Convert.ToInt32(infoTable.Rows[0]["QUANTITY"]);

                    if (refreshData.CompleteQuantity >= 1)
                    {
                        refreshData.Average = Convert.ToInt32(infoTable.Rows[0]["QUANTITY"]) / ledShowDao.FindSortingAverage();
                    }
                    else
                    {
                        refreshData.Average = 0;
                    }
                    if (ledShowDao.FindCurrentRoute().Rows.Count != 0)
                    {
                        refreshData.RouteName = ledShowDao.FindCurrentRoute().Rows[0]["ROUTENAME"].ToString();
                    }
                    else
                    {
                        refreshData.RouteName = "";
                    }

                    refreshData.Batch = Convert.ToDateTime(ledShowDao.FindOrderdate().Rows[0]["ORDERDATE"]).ToString("yyyy-MM-dd") + "批次:" + ledShowDao.FindOrderdate().Rows[0]["BATCHNO"].ToString();
                    Refresh(refreshData);
                }
                using (PersistentManager pm = new PersistentManager("DefaultConnection3"))
                {

                    LedShowDao ledShowDao = new LedShowDao();
                    ledShowDao.SetPersistentManager(pm);
                    string sortNo = Convert.ToString("all"); ;

                    DataTable infoTable = ledShowDao.FindOrderInfo(sortNo);
                    RefreshData2 refreshData2 = new RefreshData2();
                    refreshData2.TotalCustomer2 = Convert.ToInt32(infoTable.Rows[0]["CUSTOMERNUM"]);
                    refreshData2.TotalRoute2 = Convert.ToInt32(infoTable.Rows[0]["ROUTENUM"]);
                    refreshData2.TotalQuantity2 = Convert.ToInt32(infoTable.Rows[0]["QUANTITY"]);

                    infoTable = ledShowDao.FindOrderInfo("");
                    refreshData2.CompleteCustomer2 = Convert.ToInt32(infoTable.Rows[0]["CUSTOMERNUM"]);
                    refreshData2.CompleteRoute2 = Convert.ToInt32(infoTable.Rows[0]["ROUTENUM"]);
                    refreshData2.CompleteQuantity2 = Convert.ToInt32(infoTable.Rows[0]["QUANTITY"]);
                    if (refreshData2.CompleteQuantity2 >= 1)
                    {
                        refreshData2.Average2 = Convert.ToInt32(infoTable.Rows[0]["QUANTITY"]) / ledShowDao.FindSortingAverage();
                    }
                    else
                    {
                        refreshData2.Average2 = 0;
                    }
                    if (ledShowDao.FindCurrentRoute().Rows.Count != 0)
                    {
                        refreshData2.RouteName2 = ledShowDao.FindCurrentRoute().Rows[0]["ROUTENAME"].ToString();
                    }
                    else
                    {
                        refreshData2.RouteName2 = "";
                    }
                    refreshData2.Batch2 = Convert.ToDateTime(ledShowDao.FindOrderdate().Rows[0]["ORDERDATE"]).ToString("yyyy-MM-dd") + "批次:" + ledShowDao.FindOrderdate().Rows[0]["BATCHNO"].ToString();
                    Refresh2(refreshData2);

                }

            }
            catch (Exception ex)
            {
                MessageBox.Show("无法连接数据库");

            }
        }