private void ShowInfo() { Model.wx_userweixin weixin = GetWeiXinCode(); if (weixin.wxType != 4) { //必须是认证过的服务号才可以开通该功能 JscriptMsg("必须是认证过的服务号(并且开通微信支付)才可以开通该功能!", "back", "Error"); return; } BLL.wx_xjhongbao_base xjBll = new wx_xjhongbao_base(); Model.wx_xjhongbao_base model = xjBll.GetModelByWid(weixin.id); if (model == null || model.id == 0) { //新增记录 } else { //修改 hidId.Value = model.id.ToString(); this.txtaccountBalance.Text = (model.accountBalance / 100.00).ToString(); this.lbltotalLQMoney.Text = (model.totalLQMoney / 100.00).ToString(); this.txtremark.Value = model.remark; if (MyCommFun.ObjToStr(model.warningInfo, "") != "") { litWarning.Text = model.warningInfo; mytips.Style.Add("display", ""); } else { mytips.Style.Add("display", "none"); } } }
private void AddBaseInfo(int wid) { BLL.wx_xjhongbao_base xjBll = new wx_xjhongbao_base(); Model.wx_xjhongbao_base baseModel = xjBll.GetModelByWid(wid); if (baseModel == null || baseModel.id == 0) { baseModel = new Model.wx_xjhongbao_base(); baseModel.wid = wid; baseModel.createDate = DateTime.Now; baseModel.totalLQMoney = 0; baseModel.accountBalance = 0; baseModel.remark = ""; baseModel.warningInfo = ""; int retNum = xjBll.Add(baseModel); } }