예제 #1
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="dimTimeID"></param>
 /// <returns></returns>
 protected string GetBeginDate(string dimTimeID)
 {
     if (string.IsNullOrEmpty(dimTimeID))
     {
         return string.Empty;
     }
     DimTimeInfo dInfo = new DimTime().GetDimTimeInfo(dimTimeID);
     return DateTime.Parse(dInfo.Year + "-01-01").ToString("yyyyMMddhh") + "00";
 }
예제 #2
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="dimTimeID"></param>
 /// <returns></returns>
 protected string GetEndDate(string dimTimeID)
 {
     if (string.IsNullOrEmpty(dimTimeID))
     {
         return string.Empty;
     }
     DimTimeInfo dInfo = new DimTime().GetDimTimeInfo(dimTimeID);
     return DateTime.Parse(dInfo.Year + "-12-31").ToString("yyyyMMdd") + "24";
 }
예제 #3
0
 private void BindList()
 {
     string year = rblYear.SelectedValue;
     string month = "12";
     if (year == "-1")
     {
         // 年份选择更多不进行任何操作
         return;
     }
     string dimID = new DimTime().GetIDByMonth(year, month);
     DataSet ds = new CertificateFlee().GetList(year);
     rList.DataSource = ds;
     rList.DataBind();
     if (rList.Items.Count == 0)
     {
         trNull.Visible = true;
     }
 }
 private void BindList()
 {
     string year = rblYear.SelectedValue;
     string month = rblMoth.SelectedValue;
     if (year == "-1")
     {
         // 年份选择更多不进行任何操作
         return;
     }
     string dimID = new DimTime().GetIDByMonth(year, month);
     string shipID = rblShip.SelectedValue;
     DataSet ds = new BLL.InsuranceOfFreightTransport().GetList(year, month, shipID);
     rList.DataSource = ds;
     rList.DataBind();
     if (rList.Items.Count == 0)
     {
         trNull.Visible = true;
     }
 }
예제 #5
0
 private void BindList()
 {
     string year = rblYear.SelectedValue;
     string month = rblMoth.SelectedValue;
     if (year == "-1")
     {
         // 年份选择更多不进行任何操作
         return;
     }
     if (month == "0")
     {
         WUC_CommonFee1.ShowWholeYear(year);
     }
     else
     {
         string dimID = new DimTime().GetIDByMonth(year, month);
         WUC_CommonFee1.DimTimeID = dimID;
     }
 }
예제 #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    TitleInitial("备件报表汇总统计", "栏目按照船舶汇总各个季度的备件报表的关键指标,用户可以点击下方的“查看报表构成”按钮查看指标的分解情况。");

                    BindYearList();
                    string dimID = GetRequest("dimID");
                    if (string.IsNullOrEmpty(dimID) == false)
                    {
                        DimTimeInfo dInfo = new DimTime().GetDimTimeInfo(dimID);
                        int selectYear = dInfo.Year;
                        ListItem item = rblYear.Items.FindByValue(selectYear.ToString());
                        if (item != null)
                        {
                            item.Selected = true;
                        }
                        BindList(selectYear.ToString(), rblQuarter.SelectedValue);
                    }
                    else
                    {
                        BindList();
                    }
                }
            }
            catch (ArgumentNullException aex)
            {
                ShowMsg(aex.Message);
            }
            catch (Exception ex)
            {
                ShowMsg(ex.Message);
                Log(ex);
            }
        }
예제 #7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (!IsPostBack)
         {
             TitleInitial("检验报表报送情况", "用户可以点击具体指标,查看其按船舶报送时间分解的具体值。");
             BindYearList();
             BindShip();
             this.DimID = GetRequest("dimID");
             if (string.IsNullOrEmpty(this.DimID) == false)
             {
                 DimTimeInfo dInfo = new DimTime().GetDimTimeInfo(this.DimID);
                 int selectYear = dInfo.Year;
                 ListItem item = rblYear.Items.FindByValue(selectYear.ToString());
                 if (item != null)
                 {
                     item.Selected = true;
                 }
                 BindList(selectYear.ToString(), rblShip.SelectedValue);
             }
             else
             {
                 BindList();
             }
         }
     }
     catch (ArgumentNullException aex)
     {
         ShowMsg(aex.Message);
     }
     catch (Exception ex)
     {
         ShowMsg(ex.Message);
         Log(ex);
     }
 }
예제 #8
0
        /// <summary>
        /// 根据页面实体设置页面值
        /// </summary>
        /// <param name="wInfo"></param>
        private void SetPageValue(CertificateFleeInfo wInfo)
        {
            DimTimeInfo dInfo = new DimTime().GetDimTimeInfo(wInfo.DimTimeID);
            tbYear.Text = dInfo.Year.ToString();
            tbUserName.Text = this.UserCacheInfo.Name;
            tbCreateTime.Text = wInfo.CreateTime.ToShortDateString();

            ddlCurrency.SelectedValue = wInfo.CurrencyID;
            ddlYear.SelectedValue = dInfo.Year.ToString();
            ddlMonth.SelectedValue = dInfo.MonthNumOfYear.ToString();

            c发证日期.Text = wInfo.发证日期.ToShortDateString();
            c有效期至.Text = wInfo.有效期至.ToShortDateString();
            c年审有效日期.Text = wInfo.年审有效日期.ToShortDateString();
            tb项目名称.Text = wInfo.项目名称;
            rblType.SelectedValue = wInfo.证书类型;
            tb快递费.Text = wInfo.快递费;
            tb图纸复印费.Text = wInfo.图纸复印费;
            tb洗照片.Text = wInfo.洗照片;
            tb公正.Text = wInfo.公正;
            tb其他.Text = wInfo.其他;
            tb备注.Text = wInfo.备注;
        }
        protected void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                string id = this.ID;
                InsuranceOfCompensationInfo wInfo = new InsuranceOfCompensationInfo();
                if (string.IsNullOrEmpty(id) == false)
                {
                    wInfo = new InsuranceOfCompensation().GetByID(id);
                }

                wInfo.InputUserID = this.UserCacheInfo.ID;
                string year = tbYear.Text;
                string month = tbMonth.Text;
                string dimTimeID = new DimTime().GetIDByMonth(year, month);
                wInfo.DimTimeID = dimTimeID;
                wInfo.CurrencyID = ddlCurrency.SelectedValue;
                wInfo.ExchangeRateID = this.RateID;
                wInfo.ShipID = ddlShip.SelectedValue;
                wInfo.CurrencyID = ddlCurrency.SelectedValue;

                //船舶险
                wInfo.BeginDate = cBeginDate.Text;
                wInfo.EndDate = cEndDate.Text;
                wInfo.主险保额 = tb主险保额.Text;
                wInfo.船舶险保单号 = tb船舶险保单号.Text;
                wInfo.主险费率 = tb主险费率.Text;
                wInfo.主险保费 = tb主险保费.Text;
                wInfo.战争保赔险费率 = tb战争保赔险费率.Text;
                wInfo.战争保赔险保费 = tb战争保赔险保费.Text;
                wInfo.免赔额 = tb免赔额.Text;
                wInfo.船舶险总保费 = tb船舶险总保费.Text;

                //保赔险
                wInfo.保险期限自 = DateTime.Parse(c保险期限自.Text);
                wInfo.保险期限到 = DateTime.Parse(c保险期限到.Text);
                wInfo.保赔险保单号 = tb保赔险保单号.Text;
                wInfo.保赔险费率 = tb保赔险费率.Text;
                wInfo.保赔险保费 = tb保赔险保费.Text;
                wInfo.备注 = tb备注.Text;

                if (string.IsNullOrEmpty(id) == true)
                {
                    this.ID = new InsuranceOfCompensation().Add(wInfo);
                    wInfo.ID = this.ID;
                    SetPageValue(wInfo);
                }
                else
                {
                    new InsuranceOfCompensation().Update(wInfo);
                }
                ShowMsg("报表保存成功。");
            }
            catch (ArgumentNullException aex)
            {
                ShowMsg(aex.Message);
            }
            catch (Exception ex)
            {
                ShowMsg(ex.Message);
                Log(ex);
            }
        }
        /// <summary>
        /// 根据页面实体设置页面值
        /// </summary>
        /// <param name="wInfo"></param>
        private void SetPageValue(InsuranceOfCompensationInfo wInfo)
        {
            tbUserName.Text = this.UserCacheInfo.Name;
            tbCreateTime.Text = wInfo.CreateTime.ToShortDateString();
            tbYear.Text = wInfo.CreateTime.Year.ToString();
            tbMonth.Text = wInfo.CreateTime.Month.ToString();
            if (string.IsNullOrEmpty(wInfo.ID))
            {
                return;
            }

            DimTimeInfo dInfo = new DimTime().GetDimTimeInfo(wInfo.DimTimeID);
            tbMonth.Text = dInfo.MonthNumOfYear.ToString();
            tbYear.Text = dInfo.Year.ToString();

            ddlShip.SelectedValue = wInfo.ShipID.ToString();
            ddlCurrency.SelectedValue = wInfo.CurrencyID;
            ddlYear.SelectedValue = dInfo.Year.ToString();
            ddlMonth.SelectedValue = dInfo.MonthNumOfYear.ToString();

            //船舶险
            cBeginDate.Text = wInfo.BeginDate;
            cEndDate.Text = wInfo.EndDate;
            tb主险保额.Text = wInfo.主险保额;
            tb船舶险保单号.Text = wInfo.船舶险保单号;
            tb主险费率.Text = wInfo.主险费率;
            tb主险保费.Text = wInfo.主险保费;
            tb战争保赔险费率.Text = wInfo.战争保赔险费率;
            tb战争保赔险保费.Text = wInfo.战争保赔险保费;
            tb免赔额.Text = wInfo.免赔额;
            tb船舶险总保费.Text = wInfo.船舶险总保费;
            BindList(this.ID, ReportCatalog.InsuranceOfShip);

            //保赔险
            c保险期限自.Text = wInfo.保险期限自.ToString("yyyy-MM-dd");
            c保险期限到.Text = wInfo.保险期限到.ToString("yyyy-MM-dd");
            tb保赔险保单号.Text = wInfo.保赔险保单号;
            tb保赔险费率.Text = wInfo.保赔险费率;
            tb保赔险保费.Text = wInfo.保赔险保费;
            BindList(this.ID, ReportCatalog.InsuranceOfCompensation);
            tb备注.Text = wInfo.备注;
        }
예제 #11
0
 protected void btnAdd_Click(object sender, EventArgs e)
 {
     try
     {
         string dimID = lbID.Value;
         if (string.IsNullOrEmpty(dimID))
         {
             dimID = new DimTime().GetIDByMonth(DateTime.Now.Year.ToString(), DateTime.Now.Month.ToString());
         }
         string url = "JianyanInputPage.aspx?dimID=" + dimID;
         Response.Redirect(url, false);
     }
     catch (ArgumentNullException aex)
     {
         ShowMsg(aex.Message);
     }
     catch (Exception ex)
     {
         ShowMsg(ex.Message);
         Log(ex);
     }
 }
예제 #12
0
        private void SetPageValue(string id)
        {
            JianyanInputInfo wInfo = new JianyanInput().GetByID(id);
            DimTimeInfo dInfo = new DimTime().GetDimTimeInfo(wInfo.DimTimeID);
            ddlReportMonth.SelectedValue = dInfo.MonthNumOfYear.ToString();
            ddlReportYear.SelectedValue = dInfo.Year.ToString();
            tbUserName.Text = this.UserCacheInfo.Name;
            tbCreateTime.Text = wInfo.CreateTime.ToShortDateString();

            rblReportType.Items.FindByValue(wInfo.ReportTypeID).Selected = true;
            rblUsage.Items.FindByValue(wInfo.UsageType).Selected = true;
            ddlShip.SelectedItem.Selected = false;
            ddlCurrency.SelectedItem.Selected = false;
            ddlYear.SelectedItem.Selected = false;
            ddlMonth.SelectedItem.Selected = false;
            ddlShip.Items.FindByValue(wInfo.ShipID).Selected = true;
            ddlCurrency.Items.FindByValue(wInfo.CurrencyID).Selected = true;
            ddlYear.Items.FindByValue(dInfo.Year.ToString()).Selected = true;
            ddlMonth.Items.FindByValue(dInfo.MonthNumOfYear.ToString()).Selected = true;

            tb总数.Text = wInfo.总数;
            InvoiceList1.KeyID = id;
        }
예제 #13
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                string id = this.ReportID;
                BeijianInputInfo wInfo = new BeijianInputInfo();
                if (string.IsNullOrEmpty(id) == false)
                {
                    wInfo = new BeijianInput().GetByID(id);
                }

                wInfo.UsageType = rblUsage.SelectedValue;
                wInfo.ReportTypeID = rblReportType.SelectedValue;
                wInfo.InputUserID = this.UserCacheInfo.ID;
                wInfo.ShipID = ddlShip.SelectedValue;
                string year = ddlReportYear.SelectedValue;
                string month = ddlReportMonth.SelectedValue;
                string dimTimeID = new DimTime().GetIDByMonth(year, month);
                wInfo.DimTimeID = dimTimeID;
                wInfo.CurrencyID = ddlCurrency.SelectedValue;
                wInfo.ExchangeRateID = this.RateID;

                wInfo.电器 = tb电器.Text;
                wInfo.分油机 = tb分油机.Text;
                wInfo.辅机 = tb辅机.Text;
                wInfo.副机 = tb副机.Text;
                wInfo.舾装 = tb舾装.Text;
                wInfo.主机 = tb主机.Text;
                if (string.IsNullOrEmpty(id) == true)
                {
                    this.ReportID = new BeijianInput().Add(wInfo);
                }
                else
                {
                    new BeijianInput().Update(wInfo);
                }
                tb总数.Text = wInfo.总数;
                ShowMsg("物料报表保存成功。");
            }
            catch (ArgumentNullException aex)
            {
                ShowMsg(aex.Message);
            }
            catch (Exception ex)
            {
                ShowMsg(ex.Message);
                Log(ex);
            }
        }
예제 #14
0
 protected void btnView_Click(object sender, EventArgs e)
 {
     try
     {
         string year = rblYear.SelectedValue;
         string quarter = rblQuarter.SelectedValue;
         string dimID = new DimTime().GetIDByQuarter(year, quarter);
         if (string.IsNullOrEmpty(dimID))
         {
             dimID = new DimTime().GetIDByMonth(DateTime.Now.Year.ToString(), DateTime.Now.Month.ToString());
         }
         string url = "BeijianSummary.aspx?dimID=" + dimID;
         Response.Redirect(url, true);
     }
     catch (ArgumentNullException aex)
     {
         ShowMsg(aex.Message);
     }
     catch (Exception ex)
     {
         ShowMsg(ex.Message);
         Log(ex);
     }
 }
예제 #15
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                string id = this.ReportID;
                WuliaoInputInfo wInfo = new WuliaoInputInfo();
                if (string.IsNullOrEmpty(id) == false)
                {
                    wInfo = new WuliaoInput().GetByID(id);
                }

                wInfo.UsageType = rblUsage.SelectedValue;
                string reportTypeID = rblReportType.SelectedValue;
                if (string.IsNullOrEmpty(reportTypeID))
                {
                    ShowMsg("请选择报表类型。");
                    return;
                }
                wInfo.ReportTypeID = rblReportType.SelectedValue;
                wInfo.InputUserID = this.UserCacheInfo.ID;
                string year = ddlReportYear.SelectedValue;
                string month = ddlReportMonth.SelectedValue;
                string dimTimeID = new DimTime().GetIDByMonth(year, month);
                wInfo.DimTimeID = dimTimeID;
                wInfo.ShipID = ddlShip.SelectedValue;
                wInfo.CurrencyID = ddlCurrency.SelectedValue;
                wInfo.ExchangeRateID = this.RateID;

                wInfo.办公用品 = tb办公用品.Text;
                wInfo.生产用品 = tb生产用品.Text;
                wInfo.生活用品 = tb生活用品.Text;
                wInfo.缆绳 = tb缆绳.Text;
                wInfo.其他 = tb其他.Text;
                wInfo.锁具 = tb锁具.Text;
                wInfo.药品 = tb药品.Text;
                wInfo.油漆 = tb油漆.Text;
                if (string.IsNullOrEmpty(id) == true)
                {
                    this.ReportID = new WuliaoInput().Add(wInfo);
                }
                else
                {
                    new WuliaoInput().Update(wInfo);
                }
                tb总数.Text = wInfo.总数;
                ShowMsg("物料报表保存成功。");
            }
            catch (ArgumentNullException aex)
            {
                ShowMsg(aex.Message);
            }
            catch (Exception ex)
            {
                ShowMsg(ex.Message);
                Log(ex);
            }
        }
예제 #16
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="dimTimeID"></param>
        /// <param name="departmentID"></param>
        private void BindGrid(string dimTimeID, string departmentID)
        {
            IList<CommonFeeInfo> ilist = new List<CommonFeeInfo>();
            if (string.IsNullOrEmpty(this.DimTimeID) == false)
            {
                DimTimeInfo dInfo = new DimTime().GetDimTimeInfo(dimTimeID);
                string year = dInfo.Year.ToString();
                string month = dInfo.MonthNumOfYear.ToString();
                if (string.IsNullOrEmpty(departmentID) == false)
                {
                    ilist = new CommonFee().GetListAddBlank(year, month, departmentID);
                }
            }
            else if (string.IsNullOrEmpty(this.Year) == false)
            {
                if (string.IsNullOrEmpty(departmentID) == false)
                {
                    ilist = new CommonFee().GetList(this.Year, string.Empty, this.DepartmentID);
                }
            }

            gvList.DataSource = ilist;
            gvList.DataBind();
        }
        /// <summary>
        /// 根据页面实体设置页面值
        /// </summary>
        /// <param name="wInfo"></param>
        private void SetPageValue(InsuranceOfContainerInfo wInfo)
        {
            tbUserName.Text = this.UserCacheInfo.Name;
            tbCreateTime.Text = wInfo.CreateTime.ToShortDateString();
            tbYear.Text = wInfo.CreateTime.Year.ToString();
            if (string.IsNullOrEmpty(wInfo.ID))
            {
                return;
            }
            DimTimeInfo dInfo = new DimTime().GetDimTimeInfo(wInfo.DimTimeID);
            tbYear.Text = dInfo.Year.ToString();
            tbUserName.Text = this.UserCacheInfo.Name;
            tbCreateTime.Text = wInfo.CreateTime.ToShortDateString();

            ddlCurrency.SelectedValue = wInfo.CurrencyID;
            ddlYear.SelectedValue = dInfo.Year.ToString();
            ddlMonth.SelectedValue = dInfo.MonthNumOfYear.ToString();

            cBeginDate.Text = wInfo.保险期限自.ToShortDateString();
            cEndDate.Text = wInfo.保险期限到.ToShortDateString();
            tb柜号起始字母.Text = wInfo.柜号起始字母;
            tb保费.Text = wInfo.保费;
            tb集装箱数量20.Text = wInfo.集装箱数量20;
            tb集装箱数量40.Text = wInfo.集装箱数量40;
            tb单价20.Text = wInfo.单价20;
            tb单价40.Text = wInfo.单价40;
            tb保额.Text = wInfo.保额;
            tb基本险保险费率.Text = wInfo.基本险保险费率;
            tb备注.Text = wInfo.备注;
            BindList(this.ID, ReportCatalog.InsuranceOfContainer);
        }
예제 #18
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                string id = this.ReportID;
                XiuliInputInfo wInfo = new XiuliInputInfo();
                if (string.IsNullOrEmpty(id) == false)
                {
                    wInfo = new XiuliInput().GetByID(id);
                }

                wInfo.UsageType = rblUsage.SelectedValue;
                string reportTypeID = rblReportType.SelectedValue;
                if (string.IsNullOrEmpty(reportTypeID))
                {
                    ShowMsg("请选择报表类型。");
                    return;
                }
                wInfo.ReportTypeID = rblReportType.SelectedValue;
                wInfo.InputUserID = this.UserCacheInfo.ID;
                //wInfo.总数 = tb总数.Text;

                string year = ddlReportYear.SelectedValue;
                string month = ddlReportMonth.SelectedValue;
                string dimTimeID = new DimTime().GetIDByMonth(year, month);
                wInfo.DimTimeID = dimTimeID;
                wInfo.ShipID = ddlShip.SelectedValue;
                wInfo.CurrencyID = ddlCurrency.SelectedValue;
                wInfo.ExchangeRateID = this.RateID;

                wInfo.备件 = tb备件.Text;
                wInfo.修理费用 = tb修理费用.Text;
                wInfo.服务工程 = tb服务工程.Text;
                wInfo.甲板工程 = tb甲板工程.Text;
                wInfo.轮机工程 = tb轮机工程.Text;
                wInfo.电气工程 = tb电气工程.Text;
                wInfo.自购物料 = tb自购物料.Text;
                if (string.IsNullOrEmpty(id) == true)
                {
                    this.ReportID = new XiuliInput().Add(wInfo);
                }
                else
                {
                    new XiuliInput().Update(wInfo);
                }
                tb总数.Text = wInfo.总数;
                ShowMsg("修理报表保存成功。");
            }
            catch (ArgumentNullException aex)
            {
                ShowMsg(aex.Message);
            }
            catch (Exception ex)
            {
                ShowMsg(ex.Message);
                Log(ex);
            }
        }
예제 #19
0
        private void SetPageValue(string id)
        {
            XiuliInputInfo wInfo = new XiuliInput().GetByID(id);
            DimTimeInfo dInfo = new DimTime().GetDimTimeInfo(wInfo.DimTimeID);
            tbUserName.Text = this.UserCacheInfo.Name;
            tbCreateTime.Text = wInfo.CreateTime.ToShortDateString();

            rblReportType.Items.FindByValue(wInfo.ReportTypeID).Selected = true;
            rblUsage.Items.FindByValue(wInfo.UsageType).Selected = true;
            ddlShip.SelectedItem.Selected = false;
            ddlCurrency.SelectedItem.Selected = false;
            ddlYear.SelectedItem.Selected = false;
            ddlMonth.SelectedItem.Selected = false;
            ddlShip.Items.FindByValue(wInfo.ShipID).Selected = true;
            ddlCurrency.Items.FindByValue(wInfo.CurrencyID).Selected = true;
            ddlYear.Items.FindByValue(dInfo.Year.ToString()).Selected = true;
            ddlMonth.Items.FindByValue(dInfo.MonthNumOfYear.ToString()).Selected = true;

            ddlReportMonth.SelectedValue = dInfo.MonthNumOfYear.ToString();
            ddlReportYear.SelectedValue = dInfo.Year.ToString();
            tb总数.Text = wInfo.总数;

            tb备件.Text = wInfo.备件;
            tb修理费用.Text = wInfo.修理费用;
            tb服务工程.Text = wInfo.服务工程;
            tb甲板工程.Text = wInfo.甲板工程;
            tb轮机工程.Text = wInfo.轮机工程;
            tb电气工程.Text = wInfo.电气工程;
            tb自购物料.Text = wInfo.自购物料;
            InvoiceList1.KeyID = id;
        }
예제 #20
0
 protected void ddlDate_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         string year = ddlYear.SelectedValue;
         string month = ddlMonth.SelectedValue;
         string dimID = new DimTime().GetIDByMonth(year, month);
         string currencyID = ddlCurrency.SelectedValue;
         ExchangeRateInfo eInfo = new ExchangeRate().GetInfo(currencyID, dimID);
         lbRate.Text = eInfo.Rate;
         this.RateID = eInfo.ID;
     }
     catch (ArgumentNullException aex)
     {
         ShowMsg(aex.Message);
     }
     catch (Exception ex)
     {
         ShowMsg(ex.Message);
         Log(ex);
     }
 }
예제 #21
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                string id = this.ID;
                CertificateFleeInfo wInfo = new CertificateFleeInfo();
                if (string.IsNullOrEmpty(id) == false)
                {
                    wInfo = new CertificateFlee().GetByID(id);
                }

                wInfo.InputUserID = this.UserCacheInfo.ID;
                string year = tbYear.Text;
                string dimTimeID = new DimTime().GetIDByMonth(year, "12");
                wInfo.DimTimeID = dimTimeID;
                wInfo.CurrencyID = ddlCurrency.SelectedValue;
                wInfo.ExchangeRateID = this.RateID;

                wInfo.发证日期 = DateTime.Parse(c发证日期.Text);
                wInfo.有效期至 = DateTime.Parse(c有效期至.Text);
                wInfo.年审有效日期 = DateTime.Parse(c年审有效日期.Text);
                wInfo.项目名称 = tb项目名称.Text;
                wInfo.证书类型 = rblType.SelectedValue;
                wInfo.快递费 = tb快递费.Text;
                wInfo.图纸复印费 = tb图纸复印费.Text;
                wInfo.洗照片 = tb洗照片.Text;
                wInfo.公正 = tb公正.Text;
                wInfo.其他 = tb其他.Text;
                wInfo.备注 = tb备注.Text;

                if (string.IsNullOrEmpty(id) == true)
                {
                    this.ID = new CertificateFlee().Add(wInfo);
                    wInfo.ID = this.ID;
                    SetPageValue(wInfo);
                }
                else
                {
                    new CertificateFlee().Update(wInfo);
                }
                ShowMsg("报表保存成功。");
            }
            catch (ArgumentNullException aex)
            {
                ShowMsg(aex.Message);
            }
            catch (Exception ex)
            {
                ShowMsg(ex.Message);
                Log(ex);
            }
        }
 protected void btnAdd_Click(object sender, EventArgs e)
 {
     string year = rblYear.SelectedValue;
     string month = rblMoth.SelectedValue;
     if (year == "-1")
     {
         // 年份选择更多不进行任何操作
         return;
     }
     string dimID = new DimTime().GetIDByMonth(year, month);
     Response.Redirect("InsuranceOfFreightTransportInput.aspx?dimID=" + dimID, true);
 }
 /// <summary>
 /// 绑定汇率
 /// </summary>
 private void BindRate()
 {
     string year = ddlYear.SelectedValue;
     string month = ddlMonth.SelectedValue;
     string dimID = new DimTime().GetIDByMonth(year, month);
     string currencyID = ddlCurrency.SelectedValue;
     ExchangeRateInfo eInfo = new ExchangeRate().GetInfo(currencyID, dimID);
     lbRate.Text = eInfo.Rate;
     this.RateID = eInfo.ID;
 }
예제 #24
0
 protected void btnAdd_Click(object sender, EventArgs e)
 {
     string year = rblYear.SelectedValue;
     if (year == "-1")
     {
         // 年份选择更多不进行任何操作
         return;
     }
     string dimID = new DimTime().GetIDByMonth(year, "12");
     Response.Redirect("CertificateInput.aspx?dimID=" + dimID, false);
 }
        protected void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                string id = this.ID;
                InsuranceOfContainerInfo wInfo = new InsuranceOfContainerInfo();
                if (string.IsNullOrEmpty(id) == false)
                {
                    wInfo = new InsuranceOfContainer().GetByID(id);
                }

                wInfo.InputUserID = this.UserCacheInfo.ID;
                string year = tbYear.Text;
                string dimTimeID = new DimTime().GetIDByMonth(year, "12");
                wInfo.DimTimeID = dimTimeID;
                wInfo.CurrencyID = ddlCurrency.SelectedValue;
                wInfo.ExchangeRateID = this.RateID;

                wInfo.保险期限自 = DateTime.Parse(cBeginDate.Text);
                wInfo.保险期限到 = DateTime.Parse(cEndDate.Text);
                wInfo.柜号起始字母 = tb柜号起始字母.Text;
                wInfo.保费 = tb保费.Text;
                wInfo.集装箱数量20 = tb集装箱数量20.Text;
                wInfo.集装箱数量40 = tb集装箱数量40.Text;
                wInfo.单价20 = tb单价20.Text;
                wInfo.单价40 = tb单价40.Text;
                wInfo.保额 = tb保额.Text;
                wInfo.基本险保险费率 = tb基本险保险费率.Text;
                wInfo.备注 = tb备注.Text;

                if (string.IsNullOrEmpty(id) == true)
                {
                    this.ID = new InsuranceOfContainer().Add(wInfo);
                    ReportCatalog catalog = ReportCatalog.InsuranceOfContainer;
                    BindList(this.ID, catalog);
                }
                else
                {
                    new InsuranceOfContainer().Update(wInfo);
                }
                ShowMsg("报表保存成功。");
            }
            catch (ArgumentNullException aex)
            {
                ShowMsg(aex.Message);
            }
            catch (Exception ex)
            {
                ShowMsg(ex.Message);
                Log(ex);
            }
        }
        /// <summary>
        /// 根据页面实体设置页面值
        /// </summary>
        /// <param name="wInfo"></param>
        private void SetPageValue(InsuranceOfFreightTransportInfo wInfo)
        {
            tbUserName.Text = this.UserCacheInfo.Name;
            tbCreateTime.Text = wInfo.CreateTime.ToShortDateString();
            tbYear.Text = wInfo.CreateTime.Year.ToString();
            tbMonth.Text = wInfo.CreateTime.Month.ToString();
            if (string.IsNullOrEmpty(wInfo.ID))
            {
                return;
            }
            DimTimeInfo dInfo = new DimTime().GetDimTimeInfo(wInfo.DimTimeID);
            tbMonth.Text = dInfo.MonthNumOfYear.ToString();
            tbYear.Text = dInfo.Year.ToString();

            ddlVoyage.SelectedValue = wInfo.VoyageID;
            VoyageInfo vInfo = new Voyage().GetByID(wInfo.VoyageID);
            ddlShip.SelectedValue = vInfo.ShipID.ToString();
            ddlCurrency.SelectedValue = wInfo.CurrencyID;
            ddlYear.SelectedValue = dInfo.Year.ToString();
            ddlMonth.SelectedValue = dInfo.MonthNumOfYear.ToString();

            tb20英尺.Text = wInfo.Amount50kilo20feet;
            tb40英尺.Text = wInfo.Amount50kilo40feet;
            BindList(this.ID);

            tb总保费.Text = wInfo.总保费;
            lb总重柜量.Text = wInfo.总重柜量;
            tb备注.Text = wInfo.备注;
        }
        protected void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                InsuranceOfFreightTransportInfo wInfo = new InsuranceOfFreightTransportInfo();
                if (string.IsNullOrEmpty(this.ID) == false)
                {
                    wInfo = new BLL.InsuranceOfFreightTransport().GetByID(this.ID);
                }

                wInfo.VoyageID = ddlVoyage.SelectedValue;
                wInfo.InputUserID = this.UserCacheInfo.ID;
                string year = tbYear.Text;
                string month = tbMonth.Text;
                string dimTimeID = new DimTime().GetIDByMonth(year, month);
                wInfo.DimTimeID = dimTimeID;
                wInfo.CurrencyID = ddlCurrency.SelectedValue;
                wInfo.ExchangeRateID = this.RateID;
                wInfo.Amount50kilo20feet = tb20英尺.Text;
                wInfo.Amount50kilo40feet = tb40英尺.Text;
                wInfo.备注 = tb备注.Text;

                tb总保费.Text = wInfo.总保费;
                lb总重柜量.Text = wInfo.总重柜量;

                if (string.IsNullOrEmpty(this.ID) == true)
                {
                    this.ID = new BLL.InsuranceOfFreightTransport().Add(wInfo);
                    wInfo.ID = this.ID;
                    SetPageValue(wInfo);
                }
                else
                {
                    new BLL.InsuranceOfFreightTransport().Update(wInfo);
                }
                ShowMsg("报表保存成功。");
            }
            catch (ArgumentNullException aex)
            {
                ShowMsg(aex.Message);
            }
            catch (Exception ex)
            {
                ShowMsg(ex.Message);
                Log(ex);
            }
        }
예제 #28
0
        /// <summary>
        /// 根据页面实体设置页面值
        /// </summary>
        /// <param name="wInfo"></param>
        private void SetPageValue(WuliaoInputInfo wInfo, string selectValue)
        {
            DimTimeInfo dInfo = new DimTime().GetDimTimeInfo(wInfo.DimTimeID);
            ddlReportMonth.SelectedValue = dInfo.MonthNumOfYear.ToString();
            ddlReportYear.SelectedValue = dInfo.Year.ToString();
            tbUserName.Text = this.UserCacheInfo.Name;
            tbCreateTime.Text = wInfo.CreateTime.ToShortDateString();

            rblReportType.SelectedValue = selectValue;
            rblUsage.SelectedValue = wInfo.UsageType;
            ddlShip.SelectedValue = wInfo.ShipID;
            ddlCurrency.SelectedValue = wInfo.CurrencyID;
            ddlYear.SelectedValue = dInfo.Year.ToString();
            ddlMonth.SelectedValue = dInfo.MonthNumOfYear.ToString();

            tb总数.Text = wInfo.总数;
            tb办公用品.Text = wInfo.办公用品;
            tb生产用品.Text = wInfo.生产用品;
            tb生活用品.Text = wInfo.生活用品;
            tb缆绳.Text = wInfo.缆绳;
            tb其他.Text = wInfo.其他;
            tb锁具.Text = wInfo.锁具;
            tb药品.Text = wInfo.药品;
            tb油漆.Text = wInfo.油漆;
        }