Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    TitleInitial("燃润料报表列表", "编辑航次相關燃润料报表,用户可以使用“添加油料”按钮跳转到油料添加報表栏目,完善途经港口加油记录。");
                    this.VoyageIds = GetRequest("voyageIds");
                    this.ReportID = GetRequest("baseId");

                    if (string.IsNullOrEmpty(this.ReportID))
                    {
                        if (string.IsNullOrEmpty(this.VoyageIds))
                        {
                            ShowMsg("请指定报表或者报表相关的航次。");
                            return;
                        }
                        HangciBaseInput hcbi = new HangciBaseInput();
                        HangciBaseInputInfo hcbii = new HangciBaseInputInfo();

                        hcbii.ShipInputDate = DateTime.Now;
                        hcbii.GeneralManagerDate = DateTime.Now;

                        this.ReportID = hcbi.Add(hcbii);
                        new Voyage().UpdateVoyage(this.VoyageIds, this.ReportID);
                    }

                    BindData(this.ReportID);
                }
            }
            catch (ArgumentNullException aex)
            {
                ShowMsg(aex.Message);
            }
            catch (Exception ex)
            {
                ShowMsg(ex.Message);
                Log(ex);
            }
        }