Пример #1
0
 public void Update(ref BinQH BinQH)
 {
     object[] results = this.Invoke("Update", new object[] {
         BinQH
     });
     BinQH = ((BinQH)(results[0]));
 }
Пример #2
0
 private void MnuBlockBin_Click(object sender, EventArgs e)
 {
     try
     {
         Cursor.Current = Cursors.WaitCursor;
         BinQH.BinQH_Service binserv = new QHMobile.BinQH.BinQH_Service();
         binserv.Url         = WebServiceInstants.GetURL(ServiceType.BinQH);
         binserv.Credentials = nc;
         if (dt.Rows.Count > 0)
         {
             for (int i = 0; i < dt.Rows.Count; i++)
             {
                 BinQH.BinQH binupdate = binserv.Read(dt.Rows[i][1].ToString(), dt.Rows[i][0].ToString());
                 binupdate.Block_MovementSpecified = true;
                 if (dt.Rows[i][2].ToString().Trim() == "All")
                 {
                     binupdate.Block_Movement = BinQH.Block_Movement._blank_;
                 }
                 else
                 {
                     binupdate.Block_Movement = BinQH.Block_Movement.All;
                 }
                 binserv.Update(ref binupdate);
             }
             BindToGrid();
             MessageBox.Show("Update Successfully!");
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Пример #3
0
        private void txtBinCode_KeyDown(object sender, KeyEventArgs e)
        {
            try
            {
                if (e.KeyCode == Keys.Enter)
                {
                    Cursor.Current = Cursors.WaitCursor;

                    ItemQH.ItemQH_Service itemSev = new QHMobile.ItemQH.ItemQH_Service();
                    itemSev.Credentials = nc;
                    itemSev.Url         = WebServiceInstants.GetURL(ServiceType.ItemQH);

                    QHBinContent.QHBinContent_Service qhbinServ = new QHMobile.QHBinContent.QHBinContent_Service();
                    qhbinServ.Url         = WebServiceInstants.GetURL(ServiceType.QHBinContent);
                    qhbinServ.Credentials = nc;

                    List <QHBinContent.QHBinContent_Filter> filterArray = new List <QHMobile.QHBinContent.QHBinContent_Filter>();
                    QHBinContent.QHBinContent_Filter        filter      = new QHMobile.QHBinContent.QHBinContent_Filter();
                    filter.Field = QHMobile.QHBinContent.QHBinContent_Fields.Bin_Code;

                    if (string.IsNullOrEmpty(txtBinCode.Text.Trim()))
                    {
                        filter.Criteria = "''";
                    }
                    else
                    {
                        filter.Criteria = txtBinCode.Text.Trim();
                    }


                    filterArray.Add(filter);

                    QHBinContent.QHBinContent_Filter filterBaseQty = new QHMobile.QHBinContent.QHBinContent_Filter();
                    filterBaseQty.Field    = QHMobile.QHBinContent.QHBinContent_Fields.Quantity;
                    filterBaseQty.Criteria = ">0";
                    filterArray.Add(filterBaseQty);

                    QHBinContent.QHBinContent_Filter filterPCS = new QHMobile.QHBinContent.QHBinContent_Filter();
                    filterPCS.Field    = QHMobile.QHBinContent.QHBinContent_Fields.Unit_of_Measure_Code;
                    filterPCS.Criteria = "<>''";
                    filterArray.Add(filterPCS);


                    //QHBinContent.QHBinContent_Filter filter2 = new QHMobile.QHBinContent.QHBinContent_Filter();
                    //filter2.Field = QHMobile.QHBinContent.QHBinContent_Fields.Quantity;
                    //filter2.Criteria = ">0";
                    //filterArray.Add(filter2);


                    QHBinContent.QHBinContent[] qhbin = qhbinServ.ReadMultiple(filterArray.ToArray(), null, 0);

                    //MessageBox.Show(qhbin.Length.ToString());
                    //ItemQH.ItemQH findItem = itemSev.Read(qhbin[0].Item_No.ToString());

                    BinQH.BinQH_Service binsev = new QHMobile.BinQH.BinQH_Service();
                    binsev.Credentials = nc;
                    binsev.Url         = WebServiceInstants.GetURL(ServiceType.BinQH);


                    if (qhbin.Length != 0)
                    {
                        BinQH.BinQH binbl = binsev.Read(qhbin[0].Location_Code, txtBinCode.Text.Trim());

                        if (binbl.Block_Movement == QHMobile.BinQH.Block_Movement.All)
                        {
                            MessageBox.Show("This bin is blocked.Hence please try again!");
                            txtBinCode.SelectAll();
                            txtBinCode.Focus();
                        }
                        else
                        {
                            ItemQH.ItemQH findItem = itemSev.Read(qhbin[0].Item_No.ToString());

                            txtLocation.Text = qhbin[0].Location_Code;
                            //txtBinCode.Text = qhbin[0].Bin_Code;
                            txtItemNo.Text      = qhbin[0].Item_No;
                            txtQuantity.Text    = "0"; //qhbin[0].Quantity_Base.ToString();
                            cboEntryType.Text   = cboEntryType.Items[1].ToString();
                            txtPostingDate.Text = DateTime.Today.ToShortDateString();
                            txtDescription.Text = findItem.Description;
                            chkEmpty.Enabled    = true;
                        }
                    }
                    else
                    {
                        BinQH.BinQH_Service binservice = new QHMobile.BinQH.BinQH_Service();
                        binservice.Url         = WebServiceInstants.GetURL(ServiceType.BinQH);
                        binservice.Credentials = nc;

                        List <BinQH.BinQH_Filter> filterArr = new List <QHMobile.BinQH.BinQH_Filter>();

                        BinQH.BinQH_Filter bincodefilter = new QHMobile.BinQH.BinQH_Filter();
                        bincodefilter.Field = QHMobile.BinQH.BinQH_Fields.Code;

                        if (string.IsNullOrEmpty(txtBinCode.Text.Trim()))
                        {
                            bincodefilter.Criteria = "''";
                        }
                        else
                        {
                            bincodefilter.Criteria = txtBinCode.Text.Trim();
                        }

                        filterArr.Add(bincodefilter);


                        BinQH.BinQH[] binqhget = binservice.ReadMultiple(filterArr.ToArray(), null, 3);

                        if (binqhget.Length != 0)
                        {
                            if (binqhget[0].Block_Movement == QHMobile.BinQH.Block_Movement.All)
                            {
                                MessageBox.Show("The bin is blocked!");
                            }
                            else
                            {
                                txtLocation.Text = binqhget[0].Location_Code;
                                //txtBinCode.Text = qhbin[0].Bin_Code;
                                txtItemNo.Text      = "";
                                txtQuantity.Text    = "0"; //qhbin[0].Quantity_Base.ToString();
                                cboEntryType.Text   = cboEntryType.Items[1].ToString();
                                txtPostingDate.Text = DateTime.Today.ToShortDateString();
                                txtDescription.Text = "";
                                chkEmpty.Enabled    = true;
                                txtItemNo.Focus();
                            }
                        }
                        else
                        {
                            MessageBox.Show("Invalid Bin!");
                            txtBinCode.SelectAll();
                            txtBinCode.Focus();
                        }
                    }


                    Cursor.Current = Cursors.Default;

                    txtQuantity.SelectAll();
                    txtQuantity.Focus();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                Cursor.Current = Cursors.Default;
            }
        }
Пример #4
0
 /// <remarks/>
 public void EndUpdate(System.IAsyncResult asyncResult, out BinQH BinQH)
 {
     object[] results = this.EndInvoke(asyncResult);
     BinQH = ((BinQH)(results[0]));
 }
Пример #5
0
 /// <remarks/>
 public System.IAsyncResult BeginUpdate(BinQH BinQH, System.AsyncCallback callback, object asyncState)
 {
     return(this.BeginInvoke("Update", new object[] {
         BinQH
     }, callback, asyncState));
 }
Пример #6
0
        private void txtBinCode_KeyDown(object sender, KeyEventArgs e)
        {
            try
            {
                if (e.KeyCode == Keys.Enter)
                {
                    Cursor.Current = Cursors.WaitCursor;

                    QHBinContent.QHBinContent_Service qhbinServ = new QHMobile.QHBinContent.QHBinContent_Service();
                    qhbinServ.Url         = WebServiceInstants.GetURL(ServiceType.QHBinContent);
                    qhbinServ.Credentials = nc;

                    List <QHBinContent.QHBinContent_Filter> filterArray = new List <QHMobile.QHBinContent.QHBinContent_Filter>();
                    QHBinContent.QHBinContent_Filter        filter      = new QHMobile.QHBinContent.QHBinContent_Filter();
                    filter.Field = QHMobile.QHBinContent.QHBinContent_Fields.Bin_Code;

                    if (string.IsNullOrEmpty(txtBinCode.Text.Trim()))
                    {
                        filter.Criteria = "''";
                    }
                    else
                    {
                        filter.Criteria = txtBinCode.Text.Trim();
                    }

                    QHBinContent.QHBinContent_Filter filterBaseQty = new QHMobile.QHBinContent.QHBinContent_Filter();
                    filterBaseQty.Field    = QHMobile.QHBinContent.QHBinContent_Fields.Quantity;
                    filterBaseQty.Criteria = ">0";

                    QHBinContent.QHBinContent_Filter filterPCS = new QHMobile.QHBinContent.QHBinContent_Filter();
                    filterPCS.Field    = QHMobile.QHBinContent.QHBinContent_Fields.Unit_of_Measure_Code;
                    filterPCS.Criteria = "<>''";


                    filterArray.Add(filter);
                    filterArray.Add(filterPCS);
                    filterArray.Add(filterBaseQty);

                    QHBinContent.QHBinContent[] qhbin = qhbinServ.ReadMultiple(filterArray.ToArray(), null, 10);

                    BinQH.BinQH_Service binsev = new QHMobile.BinQH.BinQH_Service();
                    binsev.Url         = WebServiceInstants.GetURL(ServiceType.BinQH);
                    binsev.Credentials = nc;


                    if (qhbin.Length != 0)
                    {
                        BinQH.BinQH binbl = binsev.Read(qhbin[0].Location_Code, txtBinCode.Text.Trim());

                        if (binbl.Block_Movement == QHMobile.BinQH.Block_Movement.All)
                        {
                            MessageBox.Show("This Bin is blocked.Hence please try again!");
                        }

                        else
                        {
                            txtLocation.Text    = qhbin[0].Location_Code;
                            txtItemNo.Text      = qhbin[0].Item_No;
                            txtQuantity.Text    = "0";//qhbin[0].Quantity_Base.ToString();
                            txtPostingDate.Text = DateTime.Now.ToShortDateString();


                            txtQuantity.Enabled    = true;
                            txtPostingDate.Enabled = true;
                            txtBinCode.Enabled     = false;

                            if ((qhbin[0].Location_Code.ToString() != "RT1") || (qhbin[0].Location_Code.ToString() != "LS1"))
                            {
                                txtItemNo.Enabled = true;
                            }
                        }

                        txtQuantity.SelectAll();
                        txtQuantity.Focus();
                    }
                    else
                    {
                        List <BinQH.BinQH_Filter> filterBinArr = new List <QHMobile.BinQH.BinQH_Filter>();

                        BinQH.BinQH_Filter binfilter = new QHMobile.BinQH.BinQH_Filter();
                        binfilter.Field = QHMobile.BinQH.BinQH_Fields.Code;

                        if (string.IsNullOrEmpty(txtBinCode.Text.Trim()))
                        {
                            binfilter.Criteria = "''";
                        }
                        else
                        {
                            binfilter.Criteria = txtBinCode.Text.Trim();
                        }

                        filterBinArr.Add(binfilter);

                        BinQH.BinQH[] bingetlist = binsev.ReadMultiple(filterBinArr.ToArray(), null, 3);

                        if (bingetlist.Length != 0)
                        {
                            txtLocation.Text    = bingetlist[0].Location_Code;
                            txtItemNo.Text      = "";
                            txtQuantity.Text    = "0";//qhbin[0].Quantity_Base.ToString();
                            txtPostingDate.Text = DateTime.Now.ToShortDateString();
                            txtItemNo.Enabled   = true;
                            txtQuantity.Enabled = true;
                            txtItemNo.Focus();
                        }
                        else
                        {
                            MessageBox.Show("Bin Not found!");
                            txtItemNo.Text = "";
                        }
                    }


                    Cursor.Current = Cursors.Default;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
        }
Пример #7
0
        private void txtFromBin_KeyDown(object sender, KeyEventArgs e)
        {
            try
            {
                if (e.KeyCode == Keys.Enter)
                {
                    Cursor.Current = Cursors.WaitCursor;
                    QHBinContent.QHBinContent_Service binserv = new QHMobile.QHBinContent.QHBinContent_Service();
                    binserv.Url         = WebServiceInstants.GetURL(ServiceType.QHBinContent);
                    binserv.Credentials = nc;

                    List <QHBinContent.QHBinContent_Filter> listarray = new List <QHMobile.QHBinContent.QHBinContent_Filter>();
                    QHBinContent.QHBinContent_Filter        filterqh  = new QHMobile.QHBinContent.QHBinContent_Filter();
                    filterqh.Field = QHMobile.QHBinContent.QHBinContent_Fields.Bin_Code;

                    if (string.IsNullOrEmpty(txtFromBin.Text.Trim()))
                    {
                        filterqh.Criteria = "''";
                    }
                    else
                    {
                        filterqh.Criteria = txtFromBin.Text.Trim();
                    }

                    listarray.Add(filterqh);

                    QHBinContent.QHBinContent_Filter filterBaseQty = new QHMobile.QHBinContent.QHBinContent_Filter();
                    filterBaseQty.Field    = QHMobile.QHBinContent.QHBinContent_Fields.Quantity;
                    filterBaseQty.Criteria = ">0";
                    listarray.Add(filterBaseQty);

                    QHBinContent.QHBinContent_Filter filterPCS = new QHMobile.QHBinContent.QHBinContent_Filter();
                    filterPCS.Field    = QHMobile.QHBinContent.QHBinContent_Fields.Unit_of_Measure_Code;
                    filterPCS.Criteria = "<>''";
                    listarray.Add(filterPCS);



                    QHBinContent.QHBinContent[] qhbin = binserv.ReadMultiple(listarray.ToArray(), null, 0);


                    if (qhbin.Length != 0)
                    {
                        ItemQH.ItemQH_Service itemSev = new QHMobile.ItemQH.ItemQH_Service();
                        itemSev.Url         = WebServiceInstants.GetURL(ServiceType.ItemQH);
                        itemSev.Credentials = nc;

                        ItemQH.ItemQH item = itemSev.Read(qhbin[0].Item_No);

                        BinQH.BinQH_Service binqhsev = new QHMobile.BinQH.BinQH_Service();
                        binqhsev.Url         = WebServiceInstants.GetURL(ServiceType.BinQH);
                        binqhsev.Credentials = nc;

                        BinQH.BinQH bincheck = binqhsev.Read(qhbin[0].Location_Code, txtFromBin.Text.Trim());

                        //if (bincheck.Block_Movement == QHMobile.BinQH.Block_Movement.All)
                        //{
                        //    MessageBox.Show("This bin is blocked!Please try again.");
                        //    txtFromBin.SelectAll();
                        //    txtFromBin.Focus();
                        //}
                        //else
                        //{
                        txtItemNo.Text       = qhbin[0].Item_No;
                        lblInfoLocation.Text = qhbin[0].Location_Code;
                        textBox1.Text        = (qhbin[0].Quantity - qhbin[0].PDA_Inv_Pick_Quantity).ToString();


                        txtFishDescription.Text = item.Description;

                        //Cursor.Current = Cursors.Default;

                        txtToBin.Focus();
                        //}
                    }
                    else
                    {
                        BinQH.BinQH_Service binqhsev = new QHMobile.BinQH.BinQH_Service();
                        binqhsev.Url         = WebServiceInstants.GetURL(ServiceType.BinQH);
                        binqhsev.Credentials = nc;

                        List <BinQH.BinQH_Filter> filterArray = new List <QHMobile.BinQH.BinQH_Filter>();

                        BinQH.BinQH_Filter binfitler = new QHMobile.BinQH.BinQH_Filter();
                        binfitler.Field    = QHMobile.BinQH.BinQH_Fields.Code;
                        binfitler.Criteria = txtFromBin.Text.Trim();


                        filterArray.Add(binfitler);

                        BinQH.BinQH[] bincheck = binqhsev.ReadMultiple(filterArray.ToArray(), null, 0);

                        if (bincheck.Length > 0)
                        {
                            lblInfoLocation.Text = bincheck[0].Location_Code;
                            txtItemNo.Focus();
                        }
                        else
                        {
                            MessageBox.Show("Bin Not Found!");
                            txtFromBin.Text = "";
                            txtFromBin.Focus();
                        }
                    }
                }

                Cursor.Current = Cursors.Default;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Пример #8
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            try
            {
                if (!string.IsNullOrEmpty(txtItemNo.Text.Trim()) && !string.IsNullOrEmpty(txtFromBin.Text.Trim()) && !string.IsNullOrEmpty(txtToBin.Text.Trim()))
                //if (!txtItemNo.Text.Equals("") && !txtFromBin.Text.Equals("") && !txtToBin.Text.Equals(""))
                {
                    ItemQH.ItemQH_Service iqhservice = new QHMobile.ItemQH.ItemQH_Service();
                    iqhservice.Url         = WebServiceInstants.GetURL(ServiceType.ItemQH);
                    iqhservice.Credentials = nc;
                    ItemQH.ItemQH iqh = iqhservice.Read(txtItemNo.Text.Trim());

                    if (iqh != null)
                    {
                        BinQH.BinQH_Service binServ = new QHMobile.BinQH.BinQH_Service();
                        binServ.Url         = WebServiceInstants.GetURL(ServiceType.BinQH);
                        binServ.Credentials = nc;

                        BinQH.BinQH tobinqh = binServ.Read(lblInfoLocation.Text.ToString(), txtToBin.Text.Trim());
                        if (tobinqh != null)
                        {
                            if (tobinqh.Block_Movement == QHMobile.BinQH.Block_Movement.All)
                            {
                                MessageBox.Show("To Bin is Blocked");
                                txtToBin.SelectAll();
                                txtToBin.Focus();
                            }
                            else
                            {
                                bool flag = GotoBinvalidation();

                                if (flag == true)
                                {
                                    InsertLines();

                                    CompactSQL comsql = new CompactSQL();         //test3

                                    getdata = comsql.SelectRecord("ItemReclass"); //test3
                                    GetSQLData(getdata);                          //test3

                                    //BindTOGrid();
                                    Cursor.Current = Cursors.Default;

                                    txtFromBin.Text         = "";
                                    txtToBin.Text           = "";
                                    textBox1.Text           = "";
                                    txtItemNo.Text          = "";
                                    txtFishDescription.Text = "";
                                    lblInfoLocation.Text    = "";
                                    chkEmpty.Checked        = false;
                                    txtFromBin.Focus();
                                }
                                else
                                {
                                    MessageBox.Show("You are not allowed to put into the bin with different item!Fish Description: " + fishdescription);
                                    txtToBin.SelectAll();
                                    txtToBin.Focus();
                                }
                            }
                        }
                        // }
//////here
                    }
                    else
                    {
                        MessageBox.Show("Invalid Item No!");
                    }
                }
                else
                {
                    MessageBox.Show("All field are required to enter.");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            Cursor.Current = Cursors.Default;
        }