Esempio n. 1
0
        public void CHECKROUTE()
        {
            //WebServices.tPublicStoredproc.ProcedureKey Pdk = new WebServices.tPublicStoredproc.ProcedureKey();
            //List<WebServices.tPublicStoredproc.ProcedureKey> LsPdk = new List<WebServices.tPublicStoredproc.ProcedureKey>();
            //Pdk.Variable = "DATA";
            //Pdk.Value = txt_sn.Text.ToUpper().Trim().ToString();
            //LsPdk.Add(Pdk);
            //Pdk = new WebServices.tPublicStoredproc.ProcedureKey();
            //Pdk.Variable = "MYGROUP";
            //Pdk.Value = cbroute.Text.ToString();
            //LsPdk.Add(Pdk);

            Dictionary <string, object> dic = new Dictionary <string, object>();

            dic.Add("DATA", txt_sn.Text.ToUpper().Trim().ToString());
            dic.Add("MYGROUP", cbroute.Text.ToString());

            string ChkRes = PubStor.ExecuteProcedure("PRO_CHECKROUTE", MapListConverter.DictionaryToJson(dic));

            SaveTxtLog(System.Environment.CurrentDirectory + "\\DCT_INPUT", "ESN", ChkRes, txt_sn.Text.ToUpper().Trim().ToString());
            if (ChkRes == "OK")
            {
                SendPrgMsg(mLogMsgType.Normal, "SN:" + txt_sn.Text.ToUpper().Trim().ToString() + "  输入OK,请刷入KPSN……");
                txt_sn.Enabled   = false;
                txt_kpsn.Enabled = true;
                txt_kpsn.Focus();
            }
            else
            {
                SendPrgMsg(mLogMsgType.Error, "流程检查错误!!->" + ChkRes);
                txt_sn.Focus();
                txt_sn.SelectAll();
                return;
            }
        }
Esempio n. 2
0
        private bool Check_EMP(string EMP)
        {
            Dictionary <string, object> dic = new Dictionary <string, object>();

            dic.Add("DATA", EMP);

            //string ChkRes = PubStor.ExecuteProcedure("PRO_CHECKEMP", MapListConverter.DictionaryToJson(dic));
            //WebServices.tPublicStoredproc.ProcedureKey Pdk = new WebServices.tPublicStoredproc.ProcedureKey();
            //List<WebServices.tPublicStoredproc.ProcedureKey> LsPdk = new List<WebServices.tPublicStoredproc.ProcedureKey>();
            //Pdk.Variable = "DATA";
            //Pdk.Value = EMP;
            //LsPdk.Add(Pdk);
            string ChkRes = PubStor.ExecuteProcedure("PRO_CHECKEMP", MapListConverter.DictionaryToJson(dic));

            if (ChkRes == "OK")
            {
                SendPrgMsg(mLogMsgType.Normal, "权限检验OK,请刷入SN号码……");
                return(true);
            }
            else
            {
                SendPrgMsg(mLogMsgType.Error, "权限检验失败!!" + ChkRes);
                return(false);
            }
        }
Esempio n. 3
0
        private string CHECK_EMP(string DATA)
        {
            Dictionary <string, object> dic = new Dictionary <string, object>();

            dic.Add("DATA", DATA);
            string ChkRes = PubStor.ExecuteProcedure("PRO_CHECKEMP", MapListConverter.DictionaryToJson(dic));

            SendMsg(ChkRes == "OK" ? mLogMsgType.Normal : mLogMsgType.Error, string.Format("EMP: {0}", ChkRes));
            return(ChkRes);
        }
Esempio n. 4
0
        public string Check_Route_ATE(string DATA, string Route, string WO)
        {
            string Storedproc = "pro_Check_Route_ATE";

            IDictionary <string, object> dic = new Dictionary <string, object>();

            dic.Add("DATA", DATA);
            dic.Add("MYGROUP", Route);
            dic.Add("WO", WO);
            return(mPro.ExecuteProcedure(Storedproc.ToUpper(), MapListConverter.DictionaryToJson(dic)));
        }
Esempio n. 5
0
        private string PRO_TEST_MAIN_ONLY(string DATA, string MYGROUP, string EMP, string EC, string LINE)
        {
            Dictionary <string, object> dic = new Dictionary <string, object>();

            dic.Add("DATA", DATA);
            dic.Add("MYGROUP", MYGROUP);
            dic.Add("EMP", EMP);
            dic.Add("EC", string.IsNullOrEmpty(EC) ? "NA" : EC);
            dic.Add("LINE", LINE);

            string ChkRes = PubStor.ExecuteProcedure("PRO_TEST_MAIN_ONLY", MapListConverter.DictionaryToJson(dic));

            SendMsg(ChkRes == "OK" ? mLogMsgType.Normal : mLogMsgType.Error, string.Format("SN: {0}", ChkRes));
            return(ChkRes);
        }
Esempio n. 6
0
        private string CHECK_EC(string DATA)
        {
            //WebServices.tPublicStoredproc.ProcedureKey Pdk = new WebServices.tPublicStoredproc.ProcedureKey();
            //List<WebServices.tPublicStoredproc.ProcedureKey> LsPdk = new List<WebServices.tPublicStoredproc.ProcedureKey>();
            //Pdk.Variable = "DATA";
            //Pdk.Value = DATA;
            //LsPdk.Add(Pdk);

            Dictionary <string, object> dic = new Dictionary <string, object>();

            dic.Add("DATA", DATA);
            string ChkRes = PubStor.ExecuteProcedure("PRO_CHECKEC", MapListConverter.DictionaryToJson(dic));

            SendMsg(ChkRes == "OK" ? mLogMsgType.Normal : mLogMsgType.Error, string.Format("EC: {0}", ChkRes));
            return(ChkRes);
        }
Esempio n. 7
0
        public string CHECK_ROUTE_TOOLS_ATE(string DATA, string MYGROUP, string WO, string Tools)
        {
            string _StrErr = string.Empty;

            _StrErr = tet.CHECK_TOOLS(Tools);
            if (_StrErr.Contains("OK"))
            {
                string Storedproc = "pro_Check_Route_ATE".ToUpper();
                Dictionary <string, object> dic = new Dictionary <string, object>();
                dic.Add("DATA", DATA);
                dic.Add("MYGROUP", MYGROUP);
                dic.Add("WO", WO);
                _StrErr = mPro.ExecuteProcedure(Storedproc, MapListConverter.DictionaryToJson(dic));
            }
            return(_StrErr);
        }
Esempio n. 8
0
        public string Insert_T_TESTRESULT_INFO(Entity.tT_TESTRESULT_INFO tti)
        {
            IDictionary <string, object> dic = new Dictionary <string, object>();

            dic.Add("ESN", tti.ESN);
            dic.Add("WOID", tti.WOID);
            dic.Add("TESTSTATION", tti.TESTSTATION);
            dic.Add("TESTRESULT", tti.TESTRESULT);
            dic.Add("EQPID", tti.EQPID);
            dic.Add("EQPTYPE", tti.EQPTYPE);
            dic.Add("CUSER", tti.CUSER);
            dic.Add("FAILDESC", tti.FAILDESC);
            dic.Add("PARTNUMBER", tti.PARTNUMBER);
            dic.Add("PRODUCTNAME", tti.PRODUCTNAME);
            dic.Add("RepairFlag", tti.RepairFlag);
            return(testresult.Insert_T_TESTRESULT_INFO(MapListConverter.DictionaryToJson(dic)));
        }
Esempio n. 9
0
        public string TEST_MAIN_ONLY(string DATA, string MYGROUP, string EMP, string EC, string LINE)
        {
            string _StrErr = string.Empty;

            try
            {
                Dictionary <string, object> dic = new Dictionary <string, object>();
                dic.Add("DATA", DATA);
                dic.Add("MYGROUP", MYGROUP);
                dic.Add("EMP", EMP);
                dic.Add("EC", EC);
                dic.Add("LINE", LINE);

                _StrErr = _DbPro.ExecuteProcedure("PRO_TEST_MAIN_ONLY", MapListConverter.DictionaryToJson(dic));
                return(_StrErr);
            }
            catch (Exception ex)
            {
                return(ex.Message);
            }
        }
Esempio n. 10
0
        public string INS_ATE_BACK_INS_WIPKEYPARTS(string DATA, string MYGROUP, string EMP, string LINE, string diclswipkeypart, int Flag)
        {
            IList <IDictionary <string, object> > lsdic = MapListConverter.JsonToListDictionary(diclswipkeypart);

            string _StrErr = "OK";

            if (Flag == 0)
            {
                _StrErr = wiptracking.InsertWipKeyParts(lsdic);
            }
            if (_StrErr == "OK")
            {
                Dictionary <string, object> dic = new Dictionary <string, object>();
                dic.Add("DATA", DATA);
                dic.Add("MYGROUP", MYGROUP);
                dic.Add("EMP", EMP);
                dic.Add("LINE", LINE);

                _StrErr = mPro.ExecuteProcedure("PRO_INS_ATE_BACK", MapListConverter.DictionaryToJson(dic));
            }
            return(_StrErr);
        }
Esempio n. 11
0
 public string InsertWoBomInfoList(string diclstwbom)
 {
     try
     {
         IList <IDictionary <string, object> > lsdic = MapListConverter.JsonToListDictionary(diclstwbom);
         string         table             = "SFCR.T_WO_BOM_INFO";
         IAdminProvider dp                = (IAdminProvider)DpFactory.Create(typeof(IAdminProvider), DpFactory.ADMIN);
         IDictionary <string, object> mst = new Dictionary <string, object>();
         mst.Add("WOID", lsdic[0]["WOID"]);
         mst.Add("BLOCKED", 0);
         dp.DeleteData(table, mst);
         string err = string.Empty;
         foreach (Dictionary <string, object> itemBom in lsdic)
         {
             InsertWoBomInfo(MapListConverter.DictionaryToJson(itemBom), out err);
         }
         return(err);
     }
     catch (Exception ex)
     {
         return(ex.Message);
     }
 }
Esempio n. 12
0
        private void txt_kpsn_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                Dictionary <string, object> dic = new Dictionary <string, object>();
                dic.Add("DATA", txt_kpsn.Text.ToUpper().Trim().ToString());
                dic.Add("SN", txt_sn.Text.ToUpper().Trim().ToString());
                dic.Add("WO", cbwo.Text.ToString());

                string ChkRes = PubStor.ExecuteProcedure("PRO_CHECK_KPS_VALID", MapListConverter.DictionaryToJson(dic));
                if (ChkRes == "OK")
                {
                    INSERT_KEYPARTS();
                }
                else
                {
                    SendPrgMsg(mLogMsgType.Error, "输入的KPSN" + txt_kpsn.Text.ToUpper().Trim().ToString() + " 异常->" + change_messge(ChkRes));
                    txt_kpsn.Focus();
                    txt_kpsn.SelectAll();
                    return;
                }
            }
        }
Esempio n. 13
0
        private void INSERT_KEYPARTS()
        {
            Dictionary <string, object> dic = new Dictionary <string, object>();

            dic.Add("DATA", txt_kpsn.Text.ToUpper().Trim().ToString());
            dic.Add("SN", txt_sn.Text.ToUpper().Trim().ToString());
            dic.Add("MYGROUP", cbroute.Text.ToString());
            dic.Add("EMP", sEMP);
            dic.Add("LINE", txt_line.Text.ToString());
            dic.Add("WO", cbwo.Text.ToString());

            string ChkRes = PubStor.ExecuteProcedure("PRO_INSERT_KEYPARTS", MapListConverter.DictionaryToJson(dic));

            SaveTxtLog(System.Environment.CurrentDirectory + "\\DCT_INPUT", "KPESN", ChkRes, txt_kpsn.Text.ToUpper().Trim().ToString());
            if (ChkRes == "OK")
            {
                station_qty   = (Convert.ToInt32(station_qty) + 1).ToString();
                lab_name.Text = wo_qty + "/" + station_qty;
                SendPrgMsg(mLogMsgType.Normal, "KPSN:" + txt_kpsn.Text.ToUpper().Trim().ToString() + " OK,请刷入下一个SN……");
                if (ToolPrintlabel.Checked)
                {
                    PrintLabel(txt_sn.Text);
                }
                txt_sn.Enabled   = true;
                txt_kpsn.Enabled = false;
                txt_kpsn.Text    = "";
                txt_sn.Text      = "";
                txt_sn.Focus();
            }
            else
            {
                SendPrgMsg(mLogMsgType.Error, "KPSN:" + txt_kpsn.Text.ToUpper().Trim().ToString() + " 写入系统失败!!->" + change_messge(ChkRes));
                txt_kpsn.Focus();
                txt_kpsn.SelectAll();
                return;
            }
        }
Esempio n. 14
0
        private void GetStationList()
        {
            this.Invoke(new EventHandler(delegate
            {
                Dictionary <string, object> dic = new Dictionary <string, object>();

                DataTable dt  = ReleaseData.arrByteToDataTable(craft.Get_Craft_Info(MapListConverter.DictionaryToJson(dic)));
                DataView dv   = dt.DefaultView;
                dv.Sort       = "craftname Asc";
                DataTable dt2 = dv.ToTable();

                foreach (DataRow dr in dt2.Rows)
                {
                    if (dr["TESTFLAG"].ToString() == "0" || dr["TESTFLAG"].ToString() == "3")
                    {
                        cbroute.Items.Add(dr["craftname"].ToString());
                    }
                }
                if (cbroute.Items.Count > 0)
                {
                    cbroute.SelectedIndex = 0;
                }
            }));
        }
Esempio n. 15
0
 private void txt_sn_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         Dictionary <string, object> dic = new Dictionary <string, object>();
         dic.Add("DATA", txt_sn.Text.ToUpper().Trim().ToString());
         dic.Add("MYGROUP", cbroute.Text.ToString());
         dic.Add("LINE", txt_line.Text.ToString());
         dic.Add("WO", cbwo.Text.ToString());
         dic.Add("EMP", sEMP);
         string ChkRes = PubStor.ExecuteProcedure("PRO_SN_INPUT_WIPFIRST", MapListConverter.DictionaryToJson(dic));
         if (ChkRes == "OK")
         {
             CHECKROUTE();
         }
         else
         {
             SendPrgMsg(mLogMsgType.Error, "输入的SN: " + txt_sn.Text.ToUpper().Trim().ToString() + " 异常->" + ChkRes);
             txt_sn.Focus();
             txt_sn.SelectAll();
             return;
         }
     }
 }
Esempio n. 16
0
        private string CHECK_SN(string SN)
        {
            Dictionary <string, object> dic = new Dictionary <string, object>();

            dic.Add("DATA", SN);

            string _StrErr = refWebProcedure.Instance.ExecuteProcedure("PRO_CHECKSN", MapListConverter.DictionaryToJson(dic));

            if (_StrErr == "OK")
            {
                SendMsgPass("CHECK SN OK");
            }
            else
            {
                SendMsgError(_StrErr);
            }

            return(_StrErr);
        }
Esempio n. 17
0
        private void Call_TEST_MAIN_ONLY(string STOCK_NO)
        {
            int Cur_Rec = 0;
            int Tot_Rec = 0;
            int Err_Rec = 0;

            Dictionary <string, object> mst = new Dictionary <string, object>();

            mst.Add("STORENUMBER", STOCK_NO);
            DataTable dt = FrmBLL.publicfuntion.getNewTable(mWipTraking.GetWipTracking(mst, "ESN,WOID,LOCSTATION").Tables[0], string.Format("LOCSTATION<>'{0}'", MYGROUP));

            if (dt.Rows.Count > 0)
            {
                DataTable dt_woinfo = FrmBLL.ReleaseData.arrByteToDataTable(refWebtWoInfo.Instance.GetWoInfo(dt.Rows[0]["WOID"].ToString(), null, "LOC"));
                if (dt_woinfo.Rows.Count <= 0)
                {
                    throw new Exception("没有找到工单信息:" + dt.Rows[0]["WOID"].ToString());
                }
                Loc = dt_woinfo.Rows[0]["LOC"].ToString();
            }

            Tot_Rec = dt.Rows.Count;
            string _StrErr = string.Empty;

            foreach (DataRow dr in dt.Rows)
            {
                Dictionary <string, object> dic = new Dictionary <string, object>();
                dic.Add("DATA", dr["ESN"].ToString());
                dic.Add("MYGROUP", MYGROUP);
                dic.Add("SECTION_NAME", MySection);
                dic.Add("STATION_NAME", MyStation);
                dic.Add("EMP", mFrm.gUserInfo.userId + "-" + mFrm.gUserInfo.pwd);
                dic.Add("EC", "NA");
                dic.Add("LINE", MyLine);
                _StrErr = refWebProcedure.Instance.ExecuteProcedure("PRO_TEST_MAIN_ONLY", MapListConverter.DictionaryToJson(dic));

                //  mProcedure.PRO_TEST_MAIN_ONLY(dr["ESN"].ToString(), MYGROUP, MySection, MyStation, mFrm.gUserInfo.userId + "-" + mFrm.gUserInfo.pwd, "NA",MyLine, out  _StrErr);
                Cur_Rec             = Cur_Rec + 1;
                progressBarX1.Value = (int)(Math.Round((decimal)Cur_Rec / Tot_Rec, 2) * 100); //Convert.ToInt32((Convert.ToDouble(Cur_Rec / Tot_Rec) * 100));
                progressBarX1.Update();
                progressBarX1.Text = (Tot_Rec - Cur_Rec).ToString();
                progressBarX1.Update();
                if (Cur_Rec % 50 == 0)
                {
                    System.Threading.Thread.Sleep(200);
                    this.Refresh();
                }
                if (_StrErr != "OK")
                {
                    Err_Rec          = Err_Rec + 1;
                    LabError.Visible = true;
                    LabError.Text    = "NG Count-->" + Err_Rec.ToString();
                }
            }
        }
Esempio n. 18
0
 public string Get_Erp_WoList()
 {
     return(MapListConverter.DictionaryToJson(erpwo.Get_Erp_WoList()));
 }
Esempio n. 19
0
 private void txt_sn_KeyDown(object sender, KeyEventArgs e)
 {
     if (!string.IsNullOrEmpty(txt_sn.Text) && e.KeyCode == Keys.Enter)
     {
         if (My_InputGroup == MYGROUP)
         {
             Dictionary <string, object> dic = new Dictionary <string, object>();
             dic.Add("DATA", txt_sn.Text);
             dic.Add("MYGROUP", MYGROUP);
             dic.Add("SECTION_NAME", MySection);
             dic.Add("STATION_NAME", MyStation);
             dic.Add("EMP", My_UserId + "-" + My_Password);
             dic.Add("EC", My_EC);
             dic.Add("LINE", MyLine);
             dic.Add("WO", My_MoNumber);
             string _StrErr = refWebProcedure.Instance.ExecuteProcedure("PRO_INPUT_SN_FIRST", MapListConverter.DictionaryToJson(dic));
             if (_StrErr == "OK")
             {
                 LabInputQty.Text = (Convert.ToInt32(LabInputQty.Text) + 1).ToString();
                 SendMsgPass(string.Format("SN[{0}] OK", txt_sn.Text));
             }
             else
             {
                 SendMsgError(string.Format("ERROR:[{0}] {1}", txt_sn.Text, _StrErr));
             }
             My_EC   = "NA";
             sECFlag = false;
         }
         else
         {
             SendMsgError(string.Format("ERROR:选择途程[{0}]与工单投入途程[{1}]不一致", MYGROUP, My_InputGroup));
         }
     }
 }
Esempio n. 20
0
        private string CHECK_EC(string EC)
        {
            Dictionary <string, object> dic = new Dictionary <string, object>();

            dic.Add("DATA", EC);
            string _StrErr = refWebProcedure.Instance.ExecuteProcedure("PRO_CHECKEC", MapListConverter.DictionaryToJson(dic));

            if (_StrErr == "OK")
            {
                SendMsgPass("EC OK");
                LabStatusreject.Text      = "OK";
                LabStatusreject.ForeColor = Color.Green;
            }
            else
            {
                SendMsgError("EC ERROR: " + _StrErr);
            }
            return(_StrErr);
        }
Esempio n. 21
0
        private string TEST_MAIN_ONLY(string SN, string EC)
        {
            Dictionary <string, object> dic = new Dictionary <string, object>();

            dic.Add("DATA", SN);
            dic.Add("MYGROUP", MYGROUP);
            dic.Add("SECTION_NAME", MySection);
            dic.Add("STATION_NAME", MyStation);
            dic.Add("EMP", MyUserId + "-" + MyPassword);
            dic.Add("EC", EC);
            dic.Add("LINE", MyLine);
            string _StrErr = refWebProcedure.Instance.ExecuteProcedure("PRO_TEST_MAIN_ONLY", MapListConverter.DictionaryToJson(dic));

            if (_StrErr == "OK")
            {
                SendMsgPass(string.Format("SN[{0}] OK", SN));
            }
            else
            {
                SendMsgError(string.Format("SN[{0}] {1}", SN, _StrErr));
            }

            return(_StrErr);
        }
Esempio n. 22
0
 public static string DictionaryToJson(IDictionary <string, object> Dic)
 {
     return(MapListConverter.DictionaryToJson(Dic));
 }
Esempio n. 23
0
 private void txt_ec_KeyDown(object sender, KeyEventArgs e)
 {
     if (!string.IsNullOrEmpty(txt_ec.Text) && e.KeyCode == Keys.Enter)
     {
         Dictionary <string, object> dic = new Dictionary <string, object>();
         dic.Add("DATA", txt_ec.Text);
         string _StrErr = refWebProcedure.Instance.ExecuteProcedure("PRO_CHECKEC", MapListConverter.DictionaryToJson(dic));
         if (_StrErr == "OK")
         {
             My_EC   = txt_ec.Text;
             sECFlag = true;
             SendMsgPass("EC OK");
         }
         else
         {
             My_EC       = "NA";
             txt_ec.Text = "NA";
             sECFlag     = false;
             // SendMsgError("EC ERROR: " + _StrErr);
         }
     }
 }