Esempio n. 1
0
        private int transferRecord(string stockResult)
        {
            string locationFrom = cmbFrom.Text;
            string locationTo   = "Other";

            utrfHist.trf_hist_item_code  = itemCode;
            utrfHist.trf_hist_from       = locationFrom;
            utrfHist.trf_hist_to         = locationTo;
            utrfHist.trf_hist_qty        = Convert.ToSingle(txtQty.Text);
            utrfHist.trf_hist_unit       = Unit;
            utrfHist.trf_hist_trf_date   = DateTime.Now;
            utrfHist.trf_hist_note       = "Order: Cancel Received";
            utrfHist.trf_hist_added_date = DateTime.Now;
            utrfHist.trf_hist_added_by   = 0;
            utrfHist.trf_result          = stockResult;
            utrfHist.trf_hist_from_order = 1;
            //Inserting Data into Database
            bool success = daltrfHist.Insert(utrfHist);

            if (!success)
            {
                //Failed to insert data
                MessageBox.Show("Failed to add new transfer record");
            }
            return(daltrfHist.getIndexNo(utrfHist));
        }
        private int transferRecord(string stockResult, string itemCode, string from, string qty, string unit)
        {
            utrfHist.trf_hist_item_code  = itemCode;
            utrfHist.trf_hist_from       = from;
            utrfHist.trf_hist_to         = "Other";
            utrfHist.trf_hist_qty        = Convert.ToSingle(qty);
            utrfHist.trf_hist_unit       = unit;
            utrfHist.trf_hist_trf_date   = DateTime.Now;
            utrfHist.trf_hist_note       = "Order: Received Undo";
            utrfHist.trf_hist_added_date = DateTime.Now;
            utrfHist.trf_hist_added_by   = MainDashboard.USER_ID;
            utrfHist.trf_result          = stockResult;
            utrfHist.trf_hist_from_order = 1;
            //Inserting Data into Database
            bool success = daltrfHist.Insert(utrfHist);

            if (!success)
            {
                //Failed to insert data
                MessageBox.Show("Failed to add new transfer record");
            }
            return(daltrfHist.getIndexNo(utrfHist));
        }
Esempio n. 3
0
        private int transferRecord(string stockResult)
        {
            string locationFrom;

            if (string.IsNullOrEmpty(cmbSubFrom.Text))
            {
                locationFrom = cmbFrom.Text;
            }
            else
            {
                locationFrom = cmbSubFrom.Text;
            }

            string locationTo = cmbTo.Text;

            utrfHist.trf_hist_item_code  = txtItemCode.Text;
            utrfHist.trf_hist_from       = locationFrom;
            utrfHist.trf_hist_to         = locationTo;
            utrfHist.trf_hist_qty        = Convert.ToSingle(txtQty.Text);
            utrfHist.trf_hist_unit       = Unit;
            utrfHist.trf_hist_trf_date   = Convert.ToDateTime(dtpTrfDate.Text);
            utrfHist.trf_hist_note       = "[" + dalUser.getUsername(MainDashboard.USER_ID) + "] Order: Received";
            utrfHist.trf_hist_added_date = DateTime.Now;
            utrfHist.trf_hist_added_by   = MainDashboard.USER_ID;
            utrfHist.trf_result          = stockResult;
            utrfHist.trf_hist_from_order = 1;

            //Inserting Data into Database
            bool success = daltrfHist.Insert(utrfHist);

            if (!success)
            {
                //Failed to insert data
                MessageBox.Show("Failed to add new transfer record");
            }
            return(daltrfHist.getIndexNo(utrfHist));
        }