protected override void OnInit(EventArgs e) { base.OnInit(e); errorDisplayer = new ErrorMessageDisplayer(lblMessage); errorDisplayer.ClearErrorMessage(); transferedData = new PageDataTransfer(Request.Path); GINDataEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("GenerateGIN", "GIN"); GeneralDataEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("GenerateGIN", "General"); CommodityDataEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("GenerateGIN", "CommoditySpecifics"); ProcessDataEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("GenerateGIN", "ProcessSpecifics"); TransportDataEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("GenerateGIN", "TransportSpecifics"); try { ginProcess = GINProcessWrapper.GetGINProcess(IsPostBack); GINDataEditor.Lookup = ginProcess.LookupSource; GeneralDataEditor.Lookup = ginProcess.LookupSource; CommodityDataEditor.Lookup = ginProcess.LookupSource; ProcessDataEditor.Lookup = ginProcess.LookupSource; TransportDataEditor.Lookup = ginProcess.LookupSource; GINDataEditor.Setup(); GeneralDataEditor.Setup(); CommodityDataEditor.Setup(); ProcessDataEditor.Setup(); TransportDataEditor.Setup(); } catch (Exception ex) { throw ex; } }
protected override void OnInit(EventArgs e) { base.OnInit(e); errorDisplayer = new ErrorMessageDisplayer(lblMessage); errorDisplayer.ClearErrorMessage(); transferedData = new PageDataTransfer(Request.Path); GINDataEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("TruckLeftCompound", "GIN"); GINDataEditor.IsNew = false; GINDataEditor.Ok += new EventHandler(GINDataEditor_Ok); GINDataEditor.Cancel += new EventHandler(GINDataEditor_Cancel); try { ginProcess = GINProcessWrapper.GetGINProcess(IsPostBack); GINDataEditor.Lookup = ginProcess.LookupSource; GINDataEditor.Setup(); } catch (Exception ex) { throw ex; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { GINDataEditor.DataSource = GINInformation; GINInfo ginInfo = (GINInfo)GINDataEditor.DataSource; if (NullFinder.IsNull(ginInfo.DateApproved, "System.DateTime")) { ginInfo.DateApproved = DateTime.Now; } GINDataEditor.DataBind(); } }
protected override void OnInit(EventArgs e) { base.OnInit(e); errorDisplayer = new ErrorMessageDisplayer(lblMessage); errorDisplayer.ClearErrorMessage(); transferedData = new PageDataTransfer(Request.Path); GINDataEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("TruckScaling", "GIN"); TruckWeightEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("TruckScaling", "TruckWeight"); GINIssuanceEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("TruckScaling", "GINIssuance"); ReturnedBagsDataEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("TruckScaling", "ReturnedBags"); ReturnedBagsGridViewer.Driver = GINViewConfigurationReader.GetViewConfiguration("TruckScaling", "ReturnedBagsGrid"); AddedBagsDataEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("TruckScaling", "AddedBags"); AddedBagsGridViewer.Driver = GINViewConfigurationReader.GetViewConfiguration("TruckScaling", "AddedBagsGrid"); GINDataEditor.IsNew = false; TruckWeightEditor.IsNew = false; GINIssuanceEditor.IsNew = false; ReturnedBagsDataEditor.Ok += new EventHandler(ReturnedBagsDataEditor_Ok); ReturnedBagsDataEditor.Cancel += new EventHandler(ReturnedBagsDataEditor_Cancel); AddedBagsDataEditor.Ok += new EventHandler(AddedBagsDataEditor_Ok); AddedBagsDataEditor.Cancel += new EventHandler(AddedBagsDataEditor_Cancel); try { ginProcess = GINProcessWrapper.GetGINProcess(IsPostBack); GINDataEditor.Lookup = ginProcess.LookupSource; TruckWeightEditor.Lookup = ginProcess.LookupSource; GINIssuanceEditor.Lookup = ginProcess.LookupSource; ReturnedBagsDataEditor.Lookup = ginProcess.LookupSource; ReturnedBagsGridViewer.Lookup = ginProcess.LookupSource; AddedBagsDataEditor.Lookup = ginProcess.LookupSource; AddedBagsGridViewer.Lookup = ginProcess.LookupSource; GINDataEditor.Setup(); TruckWeightEditor.Setup(); GINIssuanceEditor.Setup(); ReturnedBagsDataEditor.Setup(); AddedBagsDataEditor.Setup(); } catch (Exception ex) { throw ex; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { try { GINDataEditor.DataSource = new LeavingTruck(GINTruckInformation); LeavingTruck lt = (LeavingTruck)GINDataEditor.DataSource; if (NullFinder.IsNull(lt.TruckCheckedOutOn, "System.DateTime")) { lt.TruckCheckedOutOn = DateTime.Now; } GINDataEditor.DataBind(); } catch (Exception ex) { throw ex; } } }
protected override void OnInit(EventArgs e) { errorDisplayer = new ErrorMessageDisplayer(lblMessage); errorDisplayer.ClearErrorMessage(); base.OnInit(e); transferedData = new PageDataTransfer(Request.Path); GINDataEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("ClientAcknowledgeGIN", "GIN"); try { ginProcess = GINProcessWrapper.GetGINProcess(IsPostBack); GINDataEditor.Lookup = ginProcess.LookupSource; GINDataEditor.Setup(); } catch (Exception ex) { throw ex; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { GINDataEditor.DataSource = GINInformation; GINDataEditor.DataBind(); try { GINReportInfo ginReport = ginProcess.GetGINReport(GINInformation.GINId); GeneralDataEditor.DataSource = ginReport; GeneralDataEditor.DataBind(); CommodityDataEditor.DataSource = ginReport; CommodityDataEditor.DataBind(); ProcessDataEditor.DataSource = ginReport; ProcessDataEditor.DataBind(); TransportDataEditor.DataSource = ginReport; TransportDataEditor.DataBind(); } catch (Exception ex) { throw ex; } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { GINDataEditor.DataSource = GINInformation; GINDataEditor.DataBind(); //try //{ // GINReportInfo ginReport = ginProcess.GetGINReport(GINInformation.GINId); // GeneralDataEditor.DataSource = ginReport; // GeneralDataEditor.DataBind(); // CommodityDataEditor.DataSource = ginReport; // CommodityDataEditor.DataBind(); // ProcessDataEditor.DataSource = ginReport; // ProcessDataEditor.DataBind(); // TransportDataEditor.DataSource = ginReport; // TransportDataEditor.DataBind(); //} //catch (Exception ex) //{ // throw ex; //} } }
protected void Page_Load(object sender, EventArgs e) { ReturnedBagsGridViewer.DataSource = from returnedBags in GINTruckInformation.Weight.ReturnedBags select new ReturnedBagsWrapper(returnedBags, ginProcess.GINProcessInformation.CommodityGradeId, ginProcess.GINProcessInformation.ProductionYear); ReturnedBagsGridViewer.DataBind(); AddedBagsGridViewer.DataSource = from addedBags in GINTruckInformation.Weight.AddedBags select new ReturnedBagsWrapper(addedBags, ginProcess.GINProcessInformation.CommodityGradeId, ginProcess.GINProcessInformation.ProductionYear); AddedBagsGridViewer.DataBind(); var gridCommands = from command in ReturnedBagsGridViewer.Driver.Columns where command.IsCommand select command.AttachedRenderer; foreach (LinkGINColumnRenderer linkCommand in gridCommands) { linkCommand.Command += new CommandEventHandler(linkCommand_Command); } var addedGridCommands = from command in AddedBagsGridViewer.Driver.Columns where command.IsCommand select command.AttachedRenderer; foreach (LinkGINColumnRenderer linkCommand in addedGridCommands) { linkCommand.Command += new CommandEventHandler(linkCommand_Command); } if (!IsPostBack) { try { GINDataEditor.DataSource = ginProcess.GetGINReport(GINTruckInformation.TruckId); GINDataEditor.DataBind(); TruckWeightEditor.DataSource = GINTruckInformation.Weight; TruckWeightEditor.DataBind(); GINIssuanceEditor.DataSource = GINTruckInformation.GIN; GINInfo ginInfo = (GINInfo)GINIssuanceEditor.DataSource; if (NullFinder.IsNull(ginInfo.DateIssued, "System.DateTime")) { ginInfo.DateIssued = DateTime.Now; } GINIssuanceEditor.DataBind(); } catch (Exception ex) { throw ex; } } TruckWeightInfo newWeight = (TruckWeightInfo)TruckWeightEditor.DataSource; decimal truckWeight = GINTruckInformation.Weight.TruckWeight; decimal grossWeight = GINTruckInformation.Weight.GrossWeight; GINTruckInformation.Weight.TruckWeight = newWeight.TruckWeight; GINTruckInformation.Weight.GrossWeight = newWeight.GrossWeight; lblNetWeight.Text = ginProcess.CalculateNetWeight(newWeight.TruckId).ToString(); GINTruckInformation.Weight.TruckWeight = truckWeight; GINTruckInformation.Weight.GrossWeight = grossWeight; }