using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using KnL;
public partial class Tools_corps_officeFee : HUserBase
{
CHCorpsOfficeFee ofee;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
HConfig.BindMonths(dpd_months);
NumericUpDown1.InitValue = DateTime.Now.Year;
dpd_months.SelectedValue = DateTime.Now.Month.ToString();
string thismonth = DateTime.Now.ToString("yyyy年M月");
ofee = new CHCorpsOfficeFee(thismonth);
if (ofee.Exists)
{
txt_cxjcfee.Text = ofee.items["ChaoXjceFee"].ToString();
txt_keyanfee.Text = ofee.items["KeyanFee"].ToString();
txt_officefee.Text = ofee.items["OfficeFee"].ToString();
txt_qitafee.Text = ofee.items["QitaFee"].ToString();
txt_summary.Text = ofee.items["Summary"].ToString();
txt_totalfee.Text = ofee.items["Total"].ToString();
txt_trainfee.Text = ofee.items["TrainingFee"].ToString();
txt_ywuxcfee.Text = ofee.items["TrainingFee"].ToString();
}
}
}
//填入
protected void Button1_Click(object sender, EventArgs e)
{
string thismonth = DateTime.Now.ToString("yyyy年M月");
string nextmonth = DateTime.Now.AddMonths(1).ToString("yyyy年M月");
ofee = new CHCorpsOfficeFee(thismonth);
if (ofee.Exists)
{
}
else
{
ofee = new CHCorpsOfficeFee();
SortedList items = new SortedList();
items.Add("ChaoXjceFee", txt_cxjcfee.Text.Trim());
items.Add("QitaFee", txt_qitafee.Text.Trim());
items.Add("Total", txt_totalfee.Text.Trim());
items.Add("Summary", txt_summary.Text.Trim());
items.Add("YearMonth", thismonth);
items.Add("OfficeFee", txt_officefee.Text.Trim());
items.Add("TrainingFee", txt_trainfee.Text.Trim());
items.Add("KeyanFee", txt_keyanfee.Text.Trim());
items.Add("YewuXCFee", txt_ywuxcfee.Text.Trim());
// Common.ShowMsg(this, listitems.Count.ToString());
if (ofee.Add(items))
{
Common.ShowMsg(this, "添加成功!");
}
}
}
}