示例#1
0
 public string GetAttRouteDesc(string routgroupid)
 {
     return(mRouteinfo.GetAttRouteDesc(routgroupid));
 }
示例#2
0
        private void imbt_Query_Click(object sender, EventArgs e)
        {
            try
            {
                Dictionary <string, object> mst = new Dictionary <string, object>();

                List <string> My_List_woId    = new List <string>();
                List <string> My_List_Carton  = new List <string>();
                List <string> My_List_Pallet  = new List <string>();
                List <string> My_List_Esn     = new List <string>();
                List <string> My_List_Station = new List <string>();
                string        My_Rework_No    = string.Empty;
                string        My_Fqc_No       = string.Empty;

                if (List_Esn.Items.Count > 0)
                {
                    foreach (string str in List_Esn.Items)
                    {
                        My_List_Esn.Add(str);
                    }
                    mst.Add("ESN", My_List_Esn);
                }
                if (List_Carton_No.Items.Count > 0)
                {
                    foreach (string str in List_Carton_No.Items)
                    {
                        My_List_Carton.Add(str);
                    }
                    mst.Add("CARTONNUMBER", My_List_Carton);
                }
                if (List_Pallet_No.Items.Count > 0)
                {
                    foreach (string str in List_Pallet_No.Items)
                    {
                        My_List_Pallet.Add(str);
                    }

                    mst.Add("PALLETNUMBER", My_List_Pallet);
                }
                if (List_woId.Items.Count > 0)
                {
                    foreach (string str in List_woId.Items)
                    {
                        My_List_woId.Add(str);
                    }
                    mst.Add("WOID", My_List_woId);
                }
                if (List_CarftInfo.Items.Count > 0)
                {
                    foreach (string str in List_CarftInfo.Items)
                    {
                        My_List_Station.Add(str);
                    }
                    mst.Add("WIPSTATION", My_List_Station);
                }
                if (My_List_Station.Count > 0 && My_List_woId.Count == 0)
                {
                    throw new Exception("选择站位时,必须选择工单");
                }

                if (Chk_Rework_No.Checked && !string.IsNullOrEmpty(txt_ReworkNo.Text))
                {
                    My_Rework_No = txt_ReworkNo.Text.Trim();
                    mst.Add("REWORKNO", My_Rework_No);
                }
                if (Chk_FqcNo.Checked && !string.IsNullOrEmpty(txt_fqc_no.Text))
                {
                    My_Fqc_No = txt_fqc_no.Text;
                    mst.Add("QA_NO", My_Fqc_No);
                }

                if (mst.Count == 0)
                {
                    MessageBoxEx.Show("请输入相关信息", "信息提示");
                    return;
                }

                DataTable dt = wipTracking.Query_WIP_Tracking(mst).Tables[0];
                if (dt.Rows.Count == 0)
                {
                    dgv_showData.DataSource = dt;
                    dgv_Total.DataSource    = DataTable_Count(dt);
                    throw new Exception("没有数据");
                }
                cbx_RouteName.Items.Clear();
                cbx_GroupName.Items.Clear();
                List <string> LsColnum = new List <string>();
                LsColnum.Add("ROUTGROUPID");
                DataTable dt_Route = FrmBLL.publicfuntion.DataTableDistinct(dt, LsColnum);
                if (dt_Route.Rows.Count == 1)
                {
                    cbx_RouteName.Items.Add(routeinfo.GetAttRouteDesc(dt_Route.Rows[0][0].ToString()));
                    cbx_RouteName.SelectedIndex = 0;
                    DataTable dtRouteinfo = routeinfo.Get_Route_Info(dt_Route.Rows[0][0].ToString()).Tables[0];
                    foreach (DataRow dr in dtRouteinfo.Rows)
                    {
                        cbx_GroupName.Items.Add(dr["CRAFTNAME"].ToString());
                    }

                    dgv_showData.DataSource = dt;
                    txt_total.Text          = dt.Rows.Count.ToString();
                    dgv_Total.DataSource    = DataTable_Count(dt);
                    LabUpdateCount.Text     = txt_total.Text;
                }
                else
                {
                    SendMsgError("多个流程的产品不可同时退站");
                }
            }
            catch (Exception ex)
            {
                SendMsgError(ex.Message);
            }
            finally
            {
            }
        }