Esempio n. 1
0
 protected void ctlAddMilage_Click(object sender, ImageClickEventArgs e)
 {
     if (!ExpenseDocumentEditor.NotifyUpdateExpense())
     {
         return;
     }
     ShowPopup(ctlMileagePopupCaller.PopupScript);
 }
 protected void ctlctlAddExpenseMPA_Click(object sender, EventArgs e)
 {
     if (!ExpenseDocumentEditor.NotifyUpdateExpense())
     {
         return;
     }
     ctlMPADocumentLookup.Show();
 }
Esempio n. 3
0
 protected void ctlAddGeneralExpense_Click(object sender, ImageClickEventArgs e)
 {
     // ShowExpenseGeneral()
     if (!ExpenseDocumentEditor.NotifyUpdateExpense())
     {
         return;
     }
     ShowPopup(ctlInvoicePopupCaller.PopupScript);
 }
        protected void ExpensesMPA_OnObjectLookUpReturn(object sender, ObjectLookUpReturnArgs e)
        {
            if (e.ObjectReturn != null)
            {
                IList <SCG.eAccounting.DTO.ValueObject.ExpensesMPA> list = (IList <SCG.eAccounting.DTO.ValueObject.ExpensesMPA>)e.ObjectReturn;
                FnExpenseDocumentService.AddExpenseMPAToTransaction(this.TransactionId, this.ExpDocumentID, list);
                this.BindExpenseMPAGridView();

                if (!ExpenseDocumentEditor.NotifyUpdateExpense())
                {
                    return;
                }

                ExpenseDocumentEditor.NotifyPaymentDetailChange();
            }
            ctlUpdatePanelExpenseGeneral.Update();
        }
Esempio n. 5
0
        protected void ctlRepeater_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            string filter = string.Empty;

            //ExpenseDataSet expDs = (ExpenseDataSet)TransactionService.GetDS(this.TransactionId);
            //ExpenseDataSet.FnExpenseInvoiceRow row = expDs.FnExpenseInvoice.FindByInvoiceID(UIHelper.ParseLong(e.CommandArgument.ToString()));
            if (e.CommandName.Equals("EditInovice"))
            {
                PopupCaller popupEdit = (PopupCaller)e.Item.FindControl("ctlEditPopupCaller");
                if (ExpenseDocumentEditor.NotifyUpdateExpense())
                {
                    ShowPopup(popupEdit.PopupScript);
                }
            }
            else if (e.CommandName.Equals("DeleteInvoice"))
            {
                ExpenseDataSet expDs     = (ExpenseDataSet)TransactionService.GetDS(this.TransactionId);
                long           invoiceID = UIHelper.ParseLong(e.CommandArgument.ToString());
                ExpenseDataSet.FnExpenseInvoiceRow[] invoice = (ExpenseDataSet.FnExpenseInvoiceRow[])expDs.FnExpenseInvoice.Select(string.Format("InvoiceID  = {0}", e.CommandArgument.ToString()));
                if (invoice.Count() > 0)
                {
                    string invoiceType = invoice[0].InvoiceDocumentType;
                    FnExpenseInvoiceService.DeleteInvoiceOnTransaction(invoiceID, this.TransactionId);
                    if (invoiceType.Equals(InvoiceType.General))
                    {
                        string URL = ShowExpenseGeneral(invoiceID);
                        ctlInvoicePopupCaller.URL = URL.Replace("[mode]", FlagEnum.NewFlag);
                    }
                    else if (invoiceType.Equals(InvoiceType.Perdiem))
                    {
                        string URL = ShowPerdiemPopup(FlagEnum.NewFlag, null);
                        ctlPerdiemPopupCaller.URL = URL;
                    }
                }

                BindExpenseGrid();
                ExpenseDocumentEditor.NotifyPaymentDetailChange();
            }
            else if (e.CommandName.Equals("ViewInvoice"))
            {
                PopupCaller popupView = (PopupCaller)e.Item.FindControl("ctlViewPopupCaller");
                ShowPopup(popupView.PopupScript);
            }
        }