コード例 #1
0
 private void bindingDgv(DateTime startDate, DateTime endDate)
 {
     using (ASRS_ServiceSoapClient srv = new ASRS_ServiceSoapClient())
     {
         dGVAlertQuery.DataSource = null;
         lst = srv.Device_Alert_GetAllByDate(startDate, endDate, "SRM_1").ToList();
         dGVAlertQuery.DataSource = lst;
     }
 }
コード例 #2
0
ファイル: FormS_WCS.cs プロジェクト: wpmyj/TCPWCS_Project
        private void btnQuery_Device_Click(object sender, EventArgs e)
        {
            var    startTime = dtPickStart_Device.Value;
            var    endTime   = dtPickEnd_Device.Value;
            string device;

            device = cmBDevice.SelectedItem.ToString();

            if (device == "堆垛机")
            {
                device = "SRM_1";
            }
            else if (device == "输送机1")
            {
                device = "SSJ1";
            }
            else if (device == "输送机2")
            {
                device = "SSJ2";
            }
            else if (device == "输送机3")
            {
                device = "SSJ3";
            }
            else
            {
                device = "SRM_1";
            }
            try
            {
                var lst = srv.Device_Alert_GetAllByDate(startTime, endTime, device);
                dGV_Alert.DataSource = null;
                dGV_Alert.DataSource = lst.ToList();
            }
            catch (Exception)
            {
            }
        }