public override void OnPageLoad(object sender, EventArgs e) { facade = new InvoiceInputFacade(this); queryVM = new InvoiceInputQueryVM(); this.QueryBuilder.DataContext = lastQueryVM = queryVM; LoadComboBoxData(); base.OnPageLoad(sender, e); SetControlStatus(); }
public override void OnPageLoad(object sender, EventArgs e) { base.OnPageLoad(sender, e); facade = new InvoiceInputFacade(this); VerifyPermission(); if (!string.IsNullOrEmpty(this.Request.Param)) { int sysNo = 0; int.TryParse(this.Request.Param, out sysNo); facade.LoadAPInvoiceWithItemsBySysNo(sysNo, (obj, args) => { vm = args.Result.Convert <APInvoiceInfo, InvoiceInputMaintainVM>(); if (vm != null) { this.DataContext = vm; lastVM = Newegg.Oversea.Silverlight.Utilities.UtilityHelper.DeepClone <InvoiceInputMaintainVM>(vm); OperationControlStatusHelper.GetChildObjects <CheckBox>(DataGrid_POItem_Result, "chkbx_SelectAll")[0].IsChecked = true; CheckBox_Click(OperationControlStatusHelper.GetChildObjects <CheckBox>(DataGrid_POItem_Result, "chkbx_SelectAll")[0], null); //OperationControlStatusHelper.GetChildObjects<CheckBox>(DataGrid_POItem_Result, "chkbx_SelectAll")[0] OperationControlStatusHelper.GetChildObjects <CheckBox>(DataGrid_InvoiceItem_Result, "chkbx_SelectAll")[0].IsChecked = true; CheckBox_Click(OperationControlStatusHelper.GetChildObjects <CheckBox>(DataGrid_InvoiceItem_Result, "chkbx_SelectAll")[0], null); } else { Window.Alert(ResInvoiceInputMaintain.Msg_NoData); } SetControlStatus(); }); } else { this.DataContext = vm = new InvoiceInputMaintainVM(); vm.InvoiceDate = DateTime.Today; lastVM = Newegg.Oversea.Silverlight.Utilities.UtilityHelper.DeepClone <InvoiceInputMaintainVM>(vm); SetControlStatus(); } BuildValidateCondition(); }