Пример #1
0
        private DataTable getProcessedInvoices()
        {
            DataTable dt = new DataTable();

            dataGridView1.DataSource = T_InvoiceHedDL.SelectAllt_InvoiceHedApproval();
            return(dt);
        }
Пример #2
0
        private void dataGridView1_RowEnter(object sender, DataGridViewCellEventArgs e)
        {
            if (dataGridView1.SelectedRows.Count > 0)
            {
                codex = dataGridView1.SelectedRows[0].Cells[0].Value.ToString();
                T_InvoiceHed cat = new T_InvoiceHed();
                cat.InvID = codex.Trim();
                T_InvoiceHedDL dl = new T_InvoiceHedDL();
                cat = dl.Selectt_InvoiceHed(cat);

                txt_DocNo.Text           = cat.InvID;
                txt_Locacode.Text        = cat.LocaCode.Trim();
                txt_locationId_name.Text = findExisting.FindExisitingLoca(txt_Locacode.Text);
                txt_Customer.Text        = cat.Customer.Trim();
                txt_Customer_name.Text   = findExisting.FindExisitingCUstomer(txt_Customer.Text);
                txt_Remarks.Text         = cat.Remarks;
                //dte_date.Value = cat.Datex.Value;
                //dte_RecivedDate.Value = cat.RecivedDate.Value;

                txt_NetTotal.Text      = cat.NetAmt.ToString();
                txt_Subtotal.Text      = cat.GrossAmt.ToString();
                txt_subtotdiscper.Text = cat.SubtotaldiscPer.ToString();
                txt_TotalDisc.Text     = cat.TotalDisc.ToString();
                txt_subtotdisc.Text    = cat.SubtotalDisc.ToString();
            }
        }
Пример #3
0
        private void btn_edit_Click(object sender, EventArgs e)
        {
            if (codex.Trim() != "")
            {
                if (UserDefineMessages.ShowMsg("", UserDefineMessages.Msg_PerfmBtn_Approve, commonFunctions.Softwarename.Trim()) == System.Windows.Forms.DialogResult.Yes)
                {
                    T_InvoiceHed objt_trnsferNote = new T_InvoiceHed();
                    objt_trnsferNote.InvID = txt_DocNo.Text.Trim();
                    T_InvoiceHedDL dl = new T_InvoiceHedDL();
                    objt_trnsferNote = dl.Selectt_InvoiceHed(objt_trnsferNote);

                    objt_trnsferNote.Approved     = 1;
                    objt_trnsferNote.ApprovedDate = DateTime.Now;
                    objt_trnsferNote.AprrovedBy   = commonFunctions.Loginuser;
                    dl.Savet_InvoiceHedSP(objt_trnsferNote, 3);

                    T_OrderTracking track = new T_OrderTracking();
                    track.OFNo            = objt_trnsferNote.OrderFormNo.Trim();
                    track                 = new T_OrderTrackingDL().Selectt_OrderTracking(track, xEnums.OrderTrackingTypes.OrderNo);
                    track.InvApproved     = 1;
                    track.InvApprovedDate = DateTime.Now;
                    track.InvApprovedUser = commonFunctions.Loginuser;
                    new T_OrderTrackingDL().Savet_OrderTrackingSP(track, 3);

                    getProcessedInvoices();
                    UserDefineMessages.ShowMsg("", UserDefineMessages.Msg_Update_Sucess, commonFunctions.Softwarename.Trim());
                }
            }
            else
            {
                errorProvider1.SetError(dataGridView1, "Pelase select a order form from the list");
            }
        }