private string GetTypeName(int id) { BLL.memberType bllmt = new BLL.memberType(); if (id == 0) { return(""); } return(bllmt.GetModel(id).TypeName); }
protected string BindCate(int id) { Model.memberType model = bllmt.GetModel(id); if (model != null) { return(model.TypeName); } return(""); }
private void Edit() { ShowFee.Style.Add("display", "none"); CAdd.Style.Add("display", "none"); ShowMd.Style.Add("display", "none"); divfa.InnerText = "编辑会员"; BtnSave.Value = "更新会员"; string id = Request.QueryString["id"]; Model.member modelmen = bll.GetModel(id); CCardNo.InnerText = modelmen.Mid.ToString(); MemberCardNo.Value = modelmen.Mid.ToString(); GetSumJf(modelmen.Mid.ToString()); Name.Value = modelmen.Name; Sex.SelectedValue = modelmen.Sex == true ? "1" : "0"; CardType.SelectedValue = modelmen.Zjtype.ToString(); CardNo.Value = modelmen.ZjNumber; CategoryId.SelectedValue = modelmen.Mtype.ToString(); Phone.Value = modelmen.Phone; BirthDay.Value = modelmen.Baithday.ToString(); Password.Attributes.Add("value", modelmen.Pwd); Love.Value = modelmen.Likes; Address.Value = modelmen.Address; Remark.Value = modelmen.Ramrek; OpenDate.InnerText = Convert.ToDateTime(modelmen.AddDate).ToString("yyyy-MM-dd"); Model.memberType modelty = bllmt.GetModel(Convert.ToInt32(modelmen.Mtype)); ExprieDate.InnerText = Convert.ToDateTime(modelmen.XqTime).ToString("yyyy-MM-dd"); StatusName.InnerText = GetState(Convert.ToInt32(modelmen.Statid)); TotalScore.InnerText = sumjf.ToString(); UsedScore.InnerHtml = duihua.ToString(); UsableScore.InnerHtml = shengyu.ToString(); FrozenScore.InnerHtml = dongjie.ToString(); TotalAmount.InnerHtml = czsum.ToString(); UsedAmount.InnerHtml = xfsum.ToString(); UsableAmount.InnerHtml = czyue.ToString(); ConsumeTimes.InnerHtml = xfnum.ToString(); ConsumeAmount.InnerHtml = xfall.ToString(); }
private void Getprice() { int id = Convert.ToInt32(context.Request.QueryString["id"]); Model.memberType modelmt = bllmt.GetModel(id); int cardPice = Convert.ToInt32(modelmt.typePrice); //卡费用 int xfprice = Convert.ToInt32(modelmt.XfPrice); //消费多少钱 int XfConsump = Convert.ToInt32(modelmt.XfConsump); //多少积分 int defaulprice = Convert.ToInt32(modelmt.StaPrice); int sk = cardPice; int cz = defaulprice; int jf = 0; if (modelmt.IsDeaflut) //开卡时有默认金额 { sk += defaulprice; } JavaScriptSerializer js = new JavaScriptSerializer(); var obj = new { sk = sk, cz = cz, jf = jf, cardPice = cardPice }; string str = js.Serialize(obj); context.Response.Write(str); }