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;
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (!IsPostBack)
         {
             TitleInitial("证书记录汇总", "用户可以维护证书相关信息,并按年份形成报表。");
             this.DimID = GetRequest("dimID");
             this.ID = GetRequest("ID");
             tbYear.Text = DateTime.Now.Year.ToString();
             tbUserName.Text = this.UserCacheInfo.Name;
             tbCreateTime.Text = DateTime.Now.ToShortDateString();
             CertificateFleeInfo wInfo = new CertificateFleeInfo();
             if (string.IsNullOrEmpty(this.ID) == false)
             {
                 wInfo = new CertificateFlee().GetByID(this.ID);
                 SetPageValue(wInfo);
             }
             BindCurrency();
             BindRate();
         }
     }
     catch (ArgumentNullException aex)
     {
         ShowMsg(aex.Message);
     }
     catch (Exception ex)
     {
         ShowMsg(ex.Message);
         Log(ex);
     }
 }
        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);
            }
        }