Пример #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            Object[] array = new Object[6];

            for (int j = 0; j < pomod.Count; j++)
            {
                if (txtScanItemNo.SelectedValue.ToString().Equals(pomod[j].lineno.ToString()))
                {
                    QHMobile.POModule assignPO = new POModule();

                    array[0]             = pomod[j].lineno;
                    assignPO.lineno      = pomod[j].lineno;
                    array[1]             = pomod[j].itemNo;
                    assignPO.itemNo      = pomod[j].itemNo;
                    array[2]             = pomod[j].description;
                    assignPO.description = pomod[j].description;
                    array[3]             = txtqty.Text.Trim();
                    assignPO.quantity    = Convert.ToDecimal(txtqty.Text.Trim());
                    array[4]             = txtlocation.Text.Trim();
                    assignPO.location    = txtlocation.Text.Trim();
                    array[5]             = txtbin.Text.Trim();
                    assignPO.bin         = txtbin.Text.Trim();

                    dt.Rows.Add(array);
                    assignPOList.Add(assignPO);

                    CompactSQL compa = new CompactSQL();
                    compa.InsertPOAssign("POAssign", array, PutNumber, TONumber);
                    lblTotalQty.Text = "Total Qty of this item is : " + pomod[j].quantity;
                }

                GrdTO.DataSource = dt;
            }
        }
Пример #2
0
        private void GetRecordsFromSQL(SqlCeDataReader getallrecords)
        {
            do
            {
                Object[]          array    = new Object[6];
                QHMobile.POModule assignPO = new POModule();

                assignPO.lineno = Convert.ToInt32(getallrecords["LineNo"]);
                array[0]        = getallrecords["LineNo"].ToString();

                array[1]             = getallrecords["itemNo"].ToString();
                assignPO.itemNo      = getallrecords["itemNo"].ToString();
                array[2]             = getallrecords["Description"].ToString();
                assignPO.description = getallrecords["Description"].ToString();
                array[3]             = getallrecords["Quantity"].ToString();
                assignPO.quantity    = Convert.ToInt32(getallrecords["Quantity"]);
                array[4]             = getallrecords["Location"].ToString();
                assignPO.location    = getallrecords["Location"].ToString();
                array[5]             = getallrecords["BinCode"].ToString();
                assignPO.bin         = getallrecords["BinCode"].ToString();

                dt.Rows.Add(array);
                assignPOList.Add(assignPO);
            } while (getallrecords.Read());

            GrdTO.DataSource = dt;
        }
Пример #3
0
        private void CreatePutAway()
        {
            try
            {
                PutAlwaysQH.PutAlwaysQH_Service putSev = new QHMobile.PutAlwaysQH.PutAlwaysQH_Service();
                putSev.Url         = WebServiceInstants.GetURL(ServiceType.PutAlwaysQH);
                putSev.Credentials = nc;

                PurchaseQH.PurchaseQH_Service poservice = new QHMobile.PurchaseQH.PurchaseQH_Service();
                poservice.Url         = WebServiceInstants.GetURL(ServiceType.PurchaseQH);
                poservice.Credentials = nc;

                PutAlwaysQH.PutAlwaysQH putAwayCreate = new QHMobile.PutAlwaysQH.PutAlwaysQH();
                PurchaseQH.PurchaseQH   poRead        = poservice.Read(TONumber);

                putSev.Create(ref putAwayCreate);
                PutNumber = putAwayCreate.No;

                putAwayCreate.Source_Document = QHMobile.PutAlwaysQH.Source_Document.Purchase_Order;
                putAwayCreate.Location_Code   = "QH1";//poRead.Location_Code;
                putSev.Update(ref putAwayCreate);

                putAwayCreate.Source_No = txtTO.Text.Trim();
                putSev.Update(ref putAwayCreate);


                PutAlwaysLinesQH.PutAlwaysLinesQH_Service lineservice = new QHMobile.PutAlwaysLinesQH.PutAlwaysLinesQH_Service();
                lineservice.Url         = WebServiceInstants.GetURL(ServiceType.PutAlwaysLinesQH);
                lineservice.Credentials = nc;

                List <PutAlwaysLinesQH.PutAlwaysLinesQH_Filter> filterArray = new List <QHMobile.PutAlwaysLinesQH.PutAlwaysLinesQH_Filter>();

                PutAlwaysLinesQH.PutAlwaysLinesQH_Filter fitlerNumber = new PutAlwaysLinesQH.PutAlwaysLinesQH_Filter();
                fitlerNumber.Field    = PutAlwaysLinesQH.PutAlwaysLinesQH_Fields.No;
                fitlerNumber.Criteria = PutNumber;

                filterArray.Add(fitlerNumber);

                PutAlwaysLinesQH.PutAlwaysLinesQH[] GridPutAwayLines = lineservice.ReadMultiple(filterArray.ToArray(), null, 0);


                for (int k = 0; k < GridPutAwayLines.Length; k++)
                {
                    PutAlwaysLinesQH.PutAlwaysLinesQH toUpdate = new QHMobile.PutAlwaysLinesQH.PutAlwaysLinesQH();
                    toUpdate          = lineservice.Read(PutAlwaysLinesQH.Activity_Type.Invt_Put_away.ToString(), PutNumber, GridPutAwayLines[k].Line_No);
                    toUpdate.Bin_Code = null;
                    lineservice.Update(ref toUpdate);
                }

                PutAlwaysLinesQH.PutAlwaysLinesQH[] PutAwayRead = lineservice.ReadMultiple(filterArray.ToArray(), null, 0);

                for (int i = 0; i < PutAwayRead.Length; i++)
                {
                    QHMobile.POModule po = new POModule();

                    po.itemNo      = PutAwayRead[i].Item_No;
                    po.lineno      = PutAwayRead[i].Line_No;
                    po.description = PutAwayRead[i].Description;
                    po.location    = PutAwayRead[i].Location_Code;
                    po.quantity    = PutAwayRead[i].Quantity;

                    pomod.Add(po);
                }

                BindToGridLines(pomod);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }