protected void Page_Load(object sender, EventArgs e) { if (Request["Id"] != null) { int InvoiceId = 0; var cDormitoryStudent = new CDormitoryRegistrations(); InvoiceId = cDormitoryStudent.GetInvoiceIdbyDormitoryStudentId(Convert.ToInt32(Request["Id"])); // Payment _linqDataSourcePaymentHistory = PaymentHistoryGrid1.GetLinqDataSourcePaymentHistory(); _radGridPaymentHistory = PaymentHistoryGrid1.GetRadGridPaymentHistory(); _linqDataSourcePaymentHistory.WhereParameters.Clear(); _linqDataSourcePaymentHistory.WhereParameters.Add("InvoiceId", DbType.Int32, InvoiceId.ToString()); //_linqDataSourcePaymentHistory.WhereParameters.Add("InvoiceId", DbType.Int32, "26367"); _linqDataSourcePaymentHistory.Where = "InvoiceId == @InvoiceId"; //Invoice Item _sqlDataSourceInvoiceItems = InvoiceItemGrid1.GetSqlDataSourceInvoiceItems(); _radGridInvoiceItems = InvoiceItemGrid1.GetRadGridInvoiceItems(); // connect event of invoice Items. InvoiceItemGrid1.SetEditMode(false); _sqlDataSourceInvoiceItems.WhereParameters.Clear(); _sqlDataSourceInvoiceItems.WhereParameters.Add("InvoiceId", DbType.Int32, InvoiceId.ToString()); //_sqlDataSourceInvoiceItems.WhereParameters.Add("InvoiceId", DbType.Int32, "26367"); _sqlDataSourceInvoiceItems.Where = "InvoiceId == @InvoiceId"; } }
protected void Page_Load(object sender, EventArgs e) { // InvoiceItemsGrid Control _sqlDataSourceInvoiceItems = InvoiceItemGrid1.GetSqlDataSourceInvoiceItems(); _radGridInvoiceItems = InvoiceItemGrid1.GetRadGridInvoiceItems(); _radGridInvoiceItems.PreRender += _radGridInvoiceItems_PreRender; InvoiceItemGrid1.SetEditMode(false); // PaymentHistoryGrid control _linqDataSourcePaymentHistory = PaymentHistoryGrid1.GetLinqDataSourcePaymentHistory(); _radGridPaymentHistory = PaymentHistoryGrid1.GetRadGridPaymentHistory(); _radGridPaymentHistory.SelectedIndexChanged += Payment_SelectedIndexChanged; if (!IsPostBack) { var excel = RadToolBarPaymentTop.FindItemByText("Excel"); if (CurrentGroupId == (int)CConstValue.UserGroupForAccountExcelExport.Accounting || CurrentGroupId == (int)CConstValue.UserGroupForAccountExcelExport.IT) { excel.Visible = true; } var btnDetailStudentReciept = RadToolBarPayment.FindItemByText("Student Detail Reciept"); var btnDetailAgencyReciept = RadToolBarPayment.FindItemByText("Agency Detail Reciept"); btnDetailStudentReciept.Enabled = false; btnDetailAgencyReciept.Enabled = false; } PaymentListSearch(); GetPaymentItems(); }
protected void Page_Load(object sender, EventArgs e) { // find user control _radGridInvoiceItems = InvoiceItemGrid1.GetRadGridInvoiceItems(); // connect event of invoice Items. _radGridInvoiceItems.PreRender += _radGridInvoiceItems_PreRender; _radGridInvoiceItems.MasterTableView.DataSourceID = null; _radGridInvoiceItems.DataSourceID = null; // just view InvoiceItemGrid1.SetEditMode(false); Id = Convert.ToInt32(Request["id"]); if (!IsPostBack) { var global = new CGlobal(); var cStudent = new CStudent(); var student = cStudent.Get(Id); var studentSite = new CSiteLocation().Get(student.SiteLocationId); StudentSiteId = studentSite.SiteId; StudentSiteLocationId = student.SiteLocationId; LoadAgency(); LoadFaculty(); LoadProgramGroup("0"); LoadProgram("0"); ddlProgramWeeks.DataSource = new CProgram().GetProgramWeeksList(); ddlProgramWeeks.DataTextField = "Name"; ddlProgramWeeks.DataValueField = "Value"; ddlProgramWeeks.DataBind(); ddlPrgHours.DataSource = global.GetDictionary(150); ddlPrgHours.DataTextField = "Name"; ddlPrgHours.DataValueField = "Value"; ddlPrgHours.DataBind(); var cCountry = new CCountry().Get((int)student.CountryId); var cCountryMarket = new CCountryMarket().Get((int)cCountry.CountryMarketId); ViewState["CountryMarketId"] = cCountry.CountryMarketId; ttName1.Text = cStudent.GetStudentName(student) + " [" + student.StudentNo + "]"; ttName2.Text = cCountryMarket.Name; } ddlAgency.OpenDropDownOnLoad = false; ddlFaculty.OpenDropDownOnLoad = false; ddlProgramGrp.OpenDropDownOnLoad = false; ddlProgramName.OpenDropDownOnLoad = false; ddlProgramWeeks.OpenDropDownOnLoad = false; ddlPrgHours.OpenDropDownOnLoad = false; }
protected void Page_Load(object sender, EventArgs e) { // find user control _sqlDataSourceInvoiceItems = InvoiceItemGrid1.GetSqlDataSourceInvoiceItems(); _radGridInvoiceItems = InvoiceItemGrid1.GetRadGridInvoiceItems(); // just view InvoiceItemGrid1.SetEditMode(false); _sqlDataSourceInvoiceItems.WhereParameters.Clear(); _sqlDataSourceInvoiceItems.WhereParameters.Add("InvoiceId", DbType.Int32, Request["id"]); _sqlDataSourceInvoiceItems.Where = "InvoiceId == @InvoiceId"; }
protected void Page_Load(object sender, EventArgs e) { // find Invoice user control _radGridInvoiceItems = InvoiceItemGrid1.GetRadGridInvoiceItems(); // connect event of invoice Items. _radGridInvoiceItems.PreRender += _radGridInvoiceItems_PreRender; _radGridInvoiceItems.MasterTableView.DataSourceID = null; _radGridInvoiceItems.DataSourceID = null; // just view InvoiceItemGrid1.SetEditMode(false); Id = Convert.ToInt32(Request["id"].ToString()); //HomestayStudentId StudentIdFromStudentRegistrar = Convert.ToInt32(Request["StudentId"].ToString()); if (Request["ScheduleChange"] != null) { string sc = Request["ScheduleChange"].ToString(); ScheduleChange = Convert.ToInt32(sc); } if (!IsPostBack) { file_upload.InitFileDownloadList((int)CConstValue.Upload.Homestay); var global = new CGlobal(); SetDateTime(); if (Id > 0) { FillFormData(Id); //Fill Form if it's not a new request UpdateToolBar.Items[0].Text = "Requested"; } Dropdown_StudentlList(Id, StudentIdFromStudentRegistrar); // Load Student List if (ScheduleChange == 1) // Schedule Change { ShowScheduleChange(true); } else { ShowScheduleChange(false); } } }
protected void Page_Load(object sender, EventArgs e) { //if (Request["__EVENTTARGET"] == "btnNew" && //Request["__EVENTARGUMENT"] == "MyArgument") //{ // //do something //} // Refund_R InvoiceItemGrid1.SetTypeOfInvoiceCoaItem(2); RefundId = Convert.ToInt32(Request["id"]); // find user control _sqlDataSourceInvoiceItems = InvoiceItemGrid1.GetSqlDataSourceInvoiceItems(); _radGridInvoiceItems = InvoiceItemGrid1.GetRadGridInvoiceItems(); // connect event of invoice Items. _radGridInvoiceItems.PreRender += _radGridInvoiceItems_PreRender; //_radGridInvoiceItems.MasterTableView.CommandItemSettings.ShowSaveChangesButton = false; FileDownloadList1.InitFileDownloadList((int)CConstValue.Upload.Refund); CreditMemoPayout1.SetReadonly(false); if (!IsPostBack) { //// new //if (Request["type"] == "0") //{ // // nothing //} //else //{ var cRefund = new CRefund(); var refund = cRefund.Get(RefundId); FileDownloadList1.GetFileDownload(refund.RefundId); InvoiceItemGrid1.InvoiceId = refund.InvoiceId; InvoiceItemGrid1.SetEditMode(true); CreditMemoPayout1.SetCreditVisible(true); var cCreditMemoPayout = new CCreditMemoPayout(); var creditMemoPayout = cCreditMemoPayout.Get(refund.CreditMemoPayoutId); CreditMemoPayout1.SetData(creditMemoPayout); //} } }
protected void Page_Load(object sender, EventArgs e) { // find user control _sqlDataSourceInvoiceItems = InvoiceItemGrid1.GetSqlDataSourceInvoiceItems(); _radGridInvoiceItems = InvoiceItemGrid1.GetRadGridInvoiceItems(); _radGridInvoiceItems.MasterTableView.CommandItemSettings.ShowSaveChangesButton = false; // Simple InvoiceItemGrid1.SetTypeOfInvoiceCoaItem(1); if (!IsPostBack) { InvoiceItemGrid1.SetEditMode(true); var cStudent = new CStudent(); var student = cStudent.GetStudentList(CurrentSiteLocationId); foreach (var stu in student) { RadComboBoxMenu.Items.Add(new RadComboBoxItem(cStudent.GetStudentName(stu) + "(" + stu.StudentNo + ")", stu.StudentId.ToString())); } } }
protected void Page_Load(object sender, EventArgs e) { // find user control _radGridInvoiceItems = InvoiceItemGrid1.GetRadGridInvoiceItems(); // connect event of invoice Items. _radGridInvoiceItems.PreRender += _radGridInvoiceItems_PreRender; _radGridInvoiceItems.MasterTableView.DataSourceID = null; _radGridInvoiceItems.DataSourceID = null; // just view InvoiceItemGrid1.SetEditMode(false); Id = Convert.ToInt32(Request["id"]); if (!IsPostBack) { var cStudent = new CStudent(); var student = cStudent.Get(Id); LoadAgency(student.SiteLocationId); var cCountry = new CCountry().Get((int)student.CountryId); var cCountryMarket = new CCountryMarket().Get((int)cCountry.CountryMarketId); ViewState["CountryMarketId"] = cCountry.CountryMarketId; ttName1.Text = cStudent.GetStudentName(student) + " [" + student.StudentNo + "]"; ttName2.Text = cCountryMarket.Name; // Package Program ddlPackageProgram.DataSource = new CPackageProgram().GetPackageProgramBySiteIdAndCountryId(student.SiteLocationId); ddlPackageProgram.DataTextField = "Name"; ddlPackageProgram.DataValueField = "Value"; ddlPackageProgram.DataBind(); if (ddlPackageProgram.Items.Count > 0) { SetPackageProgramData(ddlPackageProgram.Items[0].Value); } } ddlPackageProgram.OpenDropDownOnLoad = false; }
public void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { //var scriptManager = (RadScriptManager)Page.Master.FindControl("RadScriptManager1"); //scriptManager.RegisterPostBackControl(RadToolBar1.FindItemByText("Excel")); if (CurrentGroupId == (int)CConstValue.UserGroupForAccountExcelExport.Accounting || CurrentGroupId == (int)CConstValue.UserGroupForAccountExcelExport.IT) { RadToolBar1.FindItemByText("Excel").Visible = true; RadToolBar1.FindItemByText("ExcelDetail").Visible = true; } } // find user control _sqlDataSourceInvoiceItems = InvoiceItemGrid1.GetSqlDataSourceInvoiceItems(); _radGridInvoiceItems = InvoiceItemGrid1.GetRadGridInvoiceItems(); // connect event of invoice Items. _radGridInvoiceItems.PreRender += _radGridInvoiceItems_PreRender; InvoiceListSearch(); }