public void GetSpecialToEdit(int SpecialID) { Chain.Model.Special models = new Chain.Model.Special(); Chain.BLL.Special blls = new Chain.BLL.Special(); DataTable da = blls.GetItemAll(SpecialID).Tables[0]; this.txtSpecialName.Value = da.Rows[0]["SpecialName"].ToString(); this.txtGiveMoney.Value = Convert.ToDouble(da.Rows[0]["SpecialGive"]).ToString("0.00"); this.txtMoney.Value = Convert.ToDouble(da.Rows[0]["SpecialRecharge"]).ToString("0.00"); this.txtSpecialRemark.Value = da.Rows[0]["Sremark"].ToString(); this.lblSpecialUSer.InnerText = PubFunction.UserIDTOName(Convert.ToInt32(da.Rows[0]["SpecialUser"])); string text = da.Rows[0]["Type"].ToString(); if (text != null) { if (!(text == "1")) { if (!(text == "2")) { if (!(text == "3")) { if (text == "4") { this.rdBirthday.Checked = true; this.trDate.Style.Add("display", "none"); this.trWeek.Style.Add("display", "none"); this.trMonth.Style.Add("display", "none"); } } else { this.rdMonth.Checked = true; this.txtMonth.Value = da.Rows[0]["Month"].ToString(); this.trDate.Style.Add("display", "none"); this.trWeek.Style.Add("display", "none"); this.trMonth.Style.Remove("display"); } } else { this.rdWeek.Checked = true; this.txtWeek.Value = da.Rows[0]["Week"].ToString(); this.trDate.Style.Add("display", "none"); this.trWeek.Style.Remove("display"); this.trMonth.Style.Add("display", "none"); } } else { this.rdDate.Checked = true; this.txtStartTime.Value = da.Rows[0]["StartTime"].ToString(); this.txtEndTime.Value = da.Rows[0]["EndTime"].ToString(); this.trDate.Style.Remove("display"); this.trWeek.Style.Add("display", "none"); this.trMonth.Style.Add("display", "none"); } } }
public int Add(Chain.Model.Special model) { return(this.dal.Add(model)); }
public int Update(Chain.Model.Special model) { return(this.dal.Update(model)); }