Exemple #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (IsPostBack.IsFalse())
     {
         String match = HttpContext.Current.Request.QueryString["Match"];
         if (match == "editVoucher")
         {
             //InitializeCombo();
             //InitializeSession();
             //String vocherNo = HttpContext.Current.Request.QueryString["VoucherNo"];
             //Acc_Voucher item = manager.GetAllAcc_Voucher(vocherNo);
             //CustomList<Acc_Voucher> VoucherList = new CustomList<Acc_Voucher>();
             //VoucherList.Add(item);
             //AccVoucherList = VoucherList;
             //PopulatePFVoucherInformation(item);
         }
         else
         {
             hfCOAKey.Value = "";
             InitializeCombo();
             btnNew_Click(null, null);
             ddlCurrencyID.SelectedValue = "1";
             workflow.Visible            = false;
         }
     }
     else
     {
         Page.ClientScript.GetPostBackEventReference(this, String.Empty);
         String eventTarget = Request["__EVENTTARGET"].IsNullOrEmpty() ? String.Empty : Request["__EVENTTARGET"];
         if (eventTarget == "SearchVoucher")
         {
             Acc_Voucher searchAccVoucher         = Session[STATIC.StaticInfo.SearchSessionVarName] as Acc_Voucher;
             CustomList <Acc_Voucher> VoucherList = new CustomList <Acc_Voucher>();
             VoucherList.Add(searchAccVoucher);
             AccVoucherList = VoucherList;
             if (searchAccVoucher.IsNotNull())
             {
                 PopulatePFVoucherInformation(searchAccVoucher);
             }
         }
         else if (eventTarget == "vou_delete")
         {
             btnDelete_Click(null, null);
         }
         else if (eventTarget == "SearchCOA")
         {
             Acc_COA searchCOA = Session[STATIC.StaticInfo.SearchSessionVarName] as Acc_COA;
             txtHeadCode.Text = searchCOA.COACode;
             txtHeadName.Text = searchCOA.COAName;
             hfCOAKey.Value   = searchCOA.COAKey.ToString();
         }
         else if (eventTarget == "Test")
         {
             String      eventArgu                = Request["__EVENTARGUMENT"].IsNullOrEmpty() ? String.Empty : Request["__EVENTARGUMENT"];
             Acc_Voucher searchAccVoucher         = manager.GetAllAcc_WorkFlowVoucher(eventArgu);//Session[STATIC.StaticInfo.SearchSessionVarName] as Acc_Voucher;
             CustomList <Acc_Voucher> VoucherList = new CustomList <Acc_Voucher>();
             VoucherList.Add(searchAccVoucher);
             AccVoucherList = VoucherList;
             if (searchAccVoucher.IsNotNull())
             {
                 PopulatePFVoucherInformation(searchAccVoucher);
             }
             common.Visible   = false;
             workflow.Visible = true;
         }
     }
 }