Beispiel #1
0
      private void Init()
      {
          IPQC_Ra_Head head = new IPQC_Ra_Head();

          head.GetInfo(_head_id);

          _statue           = (status)head.status;
          lab_product.Text  = getOptionName(head.product);
          product.Value     = head.product;
          lab_testtype.Text = getOptionName(head.test_type);
          lab_testitem.Text = getOptionName(head.test_item);

          Dictionary <string, string> User = Utility.GetUIDInfo(head.employee);

          lab_applicant.Text = User["NAME"];
          lab_depat.Text     = User["DEPT"];
          lab_week.Text      = new TaiwanCalendar().GetWeekOfYear(head.received_dt, System.Globalization.CalendarWeekRule.FirstDay, System.DayOfWeek.Sunday).ToString();
          lab_Received.Text  = head.received_dt.ToString("yyyy/MM/dd");
          lab_bomdt.Text     = head.manufacture_dt.ToString("yyyy/MM/dd");
          lab_dispatch.Text  = head.dispatch_no;
          lab_material.Text  = head.material;
          lab_program.Text   = getOptionName(head.program);
          lab_sample.Text    = head.sample.ToString();
          lab_tooling.Text   = head.tooling_no;
          lab_equipment.Text = head.equipment;
          lab_Ra_no.Text     = head.ra_no;
      }
Beispiel #2
0
        private void Init()
        {
            IPQC_Ra_Head head = new IPQC_Ra_Head();

            head.GetInfo(_head_id);


            lab_product.Text  = getOptionName(head.product);
            lab_testtype.Text = getOptionName(head.test_type);
            lab_testitem.Text = getOptionName(head.test_item);

            Dictionary <string, string> User = Utility.GetUIDInfo(head.employee);

            lab_applicant.Text = User["NAME"];
            lab_depat.Text     = User["DEPT"];
            lab_week.Text      = new TaiwanCalendar().GetWeekOfYear(head.received_dt, System.Globalization.CalendarWeekRule.FirstDay, System.DayOfWeek.Sunday).ToString();
            lab_Received.Text  = head.received_dt.ToString("yyyy/MM/dd");
            lab_bomdt.Text     = head.manufacture_dt.ToString("yyyy/MM/dd");
            lab_dispatch.Text  = head.dispatch_no;
            lab_material.Text  = getOptionName(head.material);
            lab_program.Text   = getOptionName(head.program);
            txt_receiptdt.Text = head.receipt_dt;

            lab_sample.Text  = head.sample.ToString();
            lab_tooling.Text = head.tooling_no;
            if (!string.IsNullOrEmpty(head.equipment))
            {
                lab_equipment.Text = IPQC_RaBase.getMachinName(head.equipment);
            }
            lab_Ra_no.Text  = head.ra_no;
            lab_remark.Text = head.remark;


            cbo_unit.SelectedValue = head.data_nuit;
            getColor(head.product);

            if (_status == status.Complete)
            {
                if (pass)
                {
                    img_result.ImageUrl = "../img/Pass.png";
                }
                else
                {
                    img_result.ImageUrl = "../img/FAIL.png";
                }
            }
            Btn_RemindReviewer.Text = getStr("remind_reviewer");
            Btn_Stop.Text           = getStr("stop");
            //Btn_Send.Text = getStr("sb");
            Btn_fail.Text = getStr("fail");
            Btn_Save.Text = getStr("save");
            Btn_Back.Text = getStr("back");
        }
Beispiel #3
0
        private void Init()
        {
            bool isshow = false;

            if (!string.IsNullOrEmpty(_lab_id))
            {
                Inspect _ins = new Inspect();
                _ins = getLab(_lab_id);

                lab_replay.Text    = _ins.replay;
                lab_re_result.Text = _ins.report_result;
                lbtn_download.Text = _ins.report_name;

                if (!string.IsNullOrEmpty(_ins.report_result))
                {
                    isshow = true;
                }
            }
            panel_file.Visible = isshow;
            Utility.setVisable(isshow, lab_replay, lab_re_result, lbtn_download);
            IPQC_Ra_Head head = new IPQC_Ra_Head();

            head.GetInfo(_head_id);


            lab_product.Text = getOptionName(head.product);


            lab_testtype.Text = getOptionName(head.test_type);

            lab_testitem.Text = getOptionName(head.test_item);

            Dictionary <string, string> User = Utility.GetUIDInfo(head.employee);

            lab_applicant.Text = User["NAME"];
            lab_depat.Text     = User["DEPT"];
            lab_week.Text      = new TaiwanCalendar().GetWeekOfYear(head.received_dt, System.Globalization.CalendarWeekRule.FirstDay, System.DayOfWeek.Sunday).ToString();
            lab_Received.Text  = head.received_dt.ToString("yyyy/MM/dd");
            lab_bomdt.Text     = head.manufacture_dt.ToString("yyyy/MM/dd");
            lab_dispatch.Text  = head.dispatch_no;
            lab_material.Text  = getOptionName(head.material);
            lab_program.Text   = getOptionName(head.program);
            lab_sample.Text    = head.sample.ToString();
            lab_tooling.Text   = head.tooling_no;
            if (!string.IsNullOrEmpty(head.equipment))
            {
                lab_equipment.Text = IPQC_RaBase.getMachinName(head.equipment);
            }
            lab_Ra_no.Text   = head.ra_no;
            lab_remark.Text  = head.remark;
            lab_unit.Text    = getOptionName(head.data_nuit);
            lab_receipt.Text = head.receipt_dt;
            getColor(head.product);


            if (_status == status.Complete)
            {
                if (pass == 0)
                {
                    img_result.ImageUrl = "../img/FAIL.png";
                }
                else if (pass == 1)
                {
                    img_result.ImageUrl = "../img/Pass.png";
                }
                else
                {
                    img_result.ImageUrl = "../img/OOC.png";
                }
            }
        }
Beispiel #4
0
    /// <summary>
    ///  save IPQC_Ra_Head data
    /// </summary>
    /// <param name="rowid"> guid </param>
    /// <param name="action"> CRUD(Create、Read、Update、Delete) </param>
    /// <returns></returns>
    public bool save(string rowid, string action)
    {
        bool   isPass = true;
        string msg    = "";



        if (string.IsNullOrEmpty(_tooling))
        {
            msg   += "Tooling No ";
            isPass = false;
        }

        if (string.IsNullOrEmpty(_test_item))
        {
            msg   += "Test Item ";
            isPass = false;
        }

        if (string.IsNullOrEmpty(_test_type))
        {
            msg   += "Test Type ";
            isPass = false;
        }

        if (string.IsNullOrEmpty(_product))
        {
            msg   += "Product Type ";
            isPass = false;
        }

        if (string.IsNullOrEmpty(_material))
        {
            msg   += "Material ";
            isPass = false;
        }

        if (string.IsNullOrEmpty(_program))
        {
            msg   += "Program Name ";
            isPass = false;
        }

        if (_sample <= 0)
        {
            msg   += "Sample Quantity ";
            isPass = false;
        }



        if (isPass == true)
        {
            IPQC_Ra_Head head = new IPQC_Ra_Head();
            if (action == "c")
            {
                head.Insert(rowid, _product, _program, _equipment, _tooling, _test_type, _test_item, _deptNo, _bomDt, _receivedDt, _material, _sample, _remark, _dispatch, "um", CurrentUser.ID);
            }

            if (action == "u")
            {
                head.Update(rowid, _product, _program, _equipment, _tooling, _test_type, _test_item, _bomDt, _material, _sample, _remark);
            }
        }
        return(isPass);
    }
Beispiel #5
0
    private bool save(string rowid)
    {
        bool   isPass = true;
        string msg    = "";

        if (string.IsNullOrEmpty(_dispatch))
        {
            msg    = "Dispatch No ";
            isPass = false;
        }

        if (string.IsNullOrEmpty(_tooling))
        {
            msg   += "Tooling No ";
            isPass = false;
        }

        if (string.IsNullOrEmpty(_test_item))
        {
            msg   += "Test Item ";
            isPass = false;
        }

        if (string.IsNullOrEmpty(_test_type))
        {
            msg   += "Test Type ";
            isPass = false;
        }

        if (string.IsNullOrEmpty(_product))
        {
            msg   += "Product Type ";
            isPass = false;
        }

        if (string.IsNullOrEmpty(_material))
        {
            msg   += "Material ";
            isPass = false;
        }

        if (string.IsNullOrEmpty(_program))
        {
            msg   += "Program Name ";
            isPass = false;
        }

        if (_sample <= 0)
        {
            msg   += "Sample Quantity ";
            isPass = false;
        }
        if (string.IsNullOrEmpty(_equipment))
        {
            msg   += "Manufacturing Equipment ";
            isPass = false;
        }


        if (isPass == true)
        {
            IPQC_Ra_Head head = new IPQC_Ra_Head();
            head.Insert(rowid, _product, _program, _equipment, _tooling, _test_type, _test_item, _deptNo, _bomDt, _receivedDt, _material, _sample, _remark, _dispatch, "um", CurrentUser.ID);
        }
        else
        {
            string show = "please these item: " + msg;
            ClientScript.RegisterStartupScript(this.GetType(), "", "wrong('" + show + "')", true);
        }

        return(isPass);
    }
Beispiel #6
0
        protected void Btn_SendRequest_Click(object sender, SmoothEnterprise.Flowwork.UI.WebControl.FlowButtonEventArgs e)
        {
            string rowid = Request.QueryString["rowid"];

            IPQC_Ra_Head db = new IPQC_Ra_Head();


            if (this.IsValid)
            {
                try
                {
                    this.Btn_SendRequest.Flow = this.FlowClient1;
                    _cStatus = status.Send;

                    db.UpdataStatus(rowid, status.Send);
                    setDisplay();
                    // lab_InspectNO.Text = AddONumber(Request.QueryString["rowid"]);

                    // Response.Write("<script>alert('執行送審');</script>");
                    //執行送審程序
                    ArrayList managerid = new ArrayList();  //主管id
                    ArrayList managernm = new ArrayList();  //主管 Text

                    managerid.Add(_leader);
                    managernm.Add("確認");

                    int count = 0;
                    foreach (string i in managerid)
                    {
                        this.FlowClient1.AddParameter("USER" + count.ToString(), i);
                        count++;
                    }
                    count = 0;
                    foreach (string i in managernm)
                    {
                        this.FlowClient1.AddParameter("USERTITLE" + count.ToString(), i);
                        count++;
                    }


                    sharflow12_2.Flowwork.sharflow12_21 flow = new sharflow12_2.Flowwork.sharflow12_21();
                    FlowClient1.Text = "IPQC Ra檢驗單 單號:" + lab_Ra_NO.Text;

                    switch (managerid.Count)  //依舊arraylist裡面有幾個,來判斷走那條flow
                    {
                    case 1:
                        e.NextNode = flow.sharflow12_2Node1;
                        break;

                    case 2:
                        e.NextNode = flow.sharflow12_2Node1;
                        break;

                    case 3:
                        e.NextNode = flow.sharflow12_2Node1;
                        break;

                    case 4:
                        e.NextNode = flow.sharflow12_2Node1;
                        break;

                    case 5:
                        e.NextNode = flow.sharflow12_2Node1;
                        break;

                    case 6:
                        e.NextNode = flow.sharflow12_2Node1;
                        break;

                    case 7:
                        e.NextNode = flow.sharflow12_2Node1;
                        break;

                    case 8:
                        e.NextNode = flow.sharflow12_2Node1;
                        break;

                    case 9:
                        e.NextNode = flow.sharflow12_2Node1;
                        break;

                    case 10:
                        e.NextNode = flow.sharflow12_2Node1;
                        break;

                    case 11:
                        e.NextNode = flow.sharflow12_2Node1;
                        break;

                    case 12:
                        e.NextNode = flow.sharflow12_2Node1;
                        break;

                    case 13:
                        e.NextNode = flow.sharflow12_2Node1;
                        break;

                    case 14:
                        e.NextNode = flow.sharflow12_2Node1;
                        break;

                    case 15:
                        e.NextNode = flow.sharflow12_2Node1;
                        break;
                    }

                    e.NextNode.ReviewerURL = "/IPQC_Ra/IPQC_RaView.aspx";
                    FirstApprove(managerid[0].ToString());
                }
                catch (Exception ex)
                {
                    this.AddError(this, "BUTTON_save_Click()", "", ex.Message);
                }
            }
        }