protected void BindSetting()
{
DataSet ds = new DataSet()
ds.ReadXml(Server.MapPath("~/Setting/Score_Settings.xml"))
DataRow dr = ds.Tables["Setting"].Rows[0]
TextBoxRegScore.Text = dr["RegScore"].ToString()
TextBoxPerfectScore.Text = dr["PerfectScore"].ToString()
TextBoxMemberCardScore.Text = dr["MemberCardScore"].ToString()
TextBoxDevelopMemberScore.Text = dr["DevelopMemberScore"].ToString()
TextBoxShopScore.Text = dr["ShopScore"].ToString()
TextBoxSendScore.Text = dr["SendScore"].ToString()
TextBoxGroupBuyActivityScore.Text = dr["GroupBuyActivityScore"].ToString()
TextBoxBirthdayScore.Text = dr["BirthdayScore"].ToString()
TextBoxFeastScore.Text = dr["FeastScore"].ToString()
}
protected void ButtonEdit_Click(object sender, EventArgs e)
{
DataSet ds = new DataSet()
ds.ReadXml(Server.MapPath("~/Setting/Score_Settings.xml"))
DataRow dr = ds.Tables["Setting"].Rows[0]
dr["RegScore"] = TextBoxRegScore.Text
dr["PerfectScore"] = TextBoxPerfectScore.Text
dr["MemberCardScore"] = TextBoxMemberCardScore.Text
dr["DevelopMemberScore"] = TextBoxDevelopMemberScore.Text
dr["ShopScore"] = TextBoxShopScore.Text
dr["SendScore"] = TextBoxSendScore.Text
dr["GroupBuyActivityScore"] = TextBoxGroupBuyActivityScore.Text
dr["BirthdayScore"] = TextBoxBirthdayScore.Text
dr["FeastScore"] = TextBoxFeastScore.Text
ds.WriteXml(Server.MapPath("~/Setting/Score_Settings.xml"))
ds.AcceptChanges()
}
欢迎分享,转载请注明来源:夏雨云
评论列表(0条)