protected void BtnUpdate_Click(object sender, EventArgs e) { if (Request.QueryString["id"] != null) { int id = int.Parse(Request.QueryString["id"]); modelTljInfo = bllTljInfo.GetModel(id); DateTime dtCreate = DateTime.Parse(txtcreatetime.Text.Trim()); modelTljInfo.AppKeyID = int.Parse(ddlAppKeyID.SelectedValue); modelTljInfo.item_id = txtitem_id.Text.Trim(); modelTljInfo.goodsname = txtgoodsname.Text.Trim(); modelTljInfo.quan_link = txtquan_link.Text.Trim(); modelTljInfo.name = ddlname.SelectedValue; modelTljInfo.batch = int.Parse(txtbatch.Text.Trim()); modelTljInfo.total_num = int.Parse(txttotal_num.Text.Trim()); modelTljInfo.per_face = decimal.Parse(txtper_face.Text.Trim()); modelTljInfo.user_total_win_num_limit = int.Parse(txtuser_total_win_num_limit.Text.Trim()); modelTljInfo.send_start_time = DateTime.Parse(txtsend_start_time.Text.Trim()); modelTljInfo.send_end_time = DateTime.Parse(txtsend_end_time.Text.Trim()); modelTljInfo.use_end_time = int.Parse(txtuse_end_time.Text.Trim()); modelTljInfo.createtime = dtCreate; modelTljInfo.iftop = int.Parse(ddliftop.SelectedValue); modelTljInfo.campaigntype = ddlCampaignType.SelectedValue; modelTljInfo.PayMoney = decimal.Parse(txtpagePrice.Text.Trim()); bllTljInfo.Update(modelTljInfo); Response.Write(PageFunc.ShowMsgJumpE("更新成功!", "TljList.aspx")); } }
protected void BtnUpdate_Click(object sender, EventArgs e) { if (Request.QueryString["id"] != null) { int id = int.Parse(Request.QueryString["id"]); string username = txtUserName.Text.Trim(); var model = bllAdmin.GetModel(p => p.ID != id && p.UserName.Equals(username)); if (model != null) { PageFunc.AjaxAlert(this.Page, "用户名已存在!"); return; } modelAdmin = bllAdmin.GetModel(int.Parse(Request.QueryString["id"])); modelAdmin.UserName = username; if (txtPwd.Text != "重新设置密码") { modelAdmin.UserPwd = PageFunc.Encrypt(txtPwd.Text, 1); } modelAdmin.Enabled = chbIsEnabled.Checked; modelAdmin.UserType = ddlUserType.SelectedValue; modelAdmin.Remark = txtRemark.Text.Trim(); modelAdmin.TbAccount = ddlAccount.SelectedValue; bllAdmin.Update(modelAdmin); Response.Write(PageFunc.ShowMsgJumpE("更新成功!", "AdminList.aspx")); } }
private void add() { string planLink = txtplan_link.Text.Trim(); string camId = ""; Regex reg = new Regex("campaignId=(.+)&?"); Match match = reg.Match(planLink); camId = match.Groups[1].Value; var model = bllplans.GetModel(p => p.planlink.ToLower() == planLink || p.campaignId == camId); if (model != null) { PageFunc.AjaxAlert(this.Page, "计划链接已存在!"); return; } modelplans = new Model.plans(); modelplans.item_id = txtitem_id.Text.Trim(); modelplans.goodsname = txtgoodsname.Text.Trim(); modelplans.pic = txtitem_pic.Value.Trim(); modelplans.planname = txtplan_name.Text.Trim(); modelplans.campaignId = txtcampaignId.Text.Trim(); modelplans.planlink = txtplan_link.Text.Trim(); modelplans.coupon_url = txtquan_link.Text.Trim(); modelplans.commission_dx = txtcommission_dx.Text.Trim(); modelplans.commission_MKT = txtcommission_MKT.Text.Trim(); modelplans.ifok = "正常"; modelplans.zctime = DateTime.Now; decimal paymoney = 0m; decimal.TryParse(txtPayMoney.Text.Trim(), out paymoney); modelplans.PayMoney = paymoney; bllplans.Add(modelplans); Response.Write(PageFunc.ShowMsgJumpE("添加成功!", "plansList.aspx")); }
protected void BtnSubmit_Click(object sender, EventArgs e) { var loginModel = Session[sessionAdminModel] as Model.AdminInfo; modelAdmin = bllAdmin.GetModel(loginModel.ID); modelAdmin.UserPwd = PageFunc.Encrypt(txtPwd.Text, 1); bllAdmin.Update(modelAdmin); Response.Write(PageFunc.ShowMsgJumpE("更新成功!", "ChangePwd.aspx")); }
protected void BtnSubmit_Click(object sender, EventArgs e) { modelappkey.AppKey = txtAppKey.Text.Trim(); modelappkey.AppSecret = txtAppSecret.Text.Trim(); modelappkey.AppName = txtAppName.Text.Trim(); modelappkey.TbAccount = txtTbAccount.Text.Trim(); modelappkey.IsDefault = chbIsDefault.Checked; bllappkey.Add(modelappkey); Response.Write(PageFunc.ShowMsgJumpE("添加成功!", "appkeyList.aspx")); }
private void add() { DateTime dtCreate = DateTime.Parse(txtcreatetime.Text.Trim()); int batch = int.Parse(txtbatch.Text.Trim()); for (int i = 0; i < batch; i++) { modelTljInfo = new Model.TljInfo(); modelTljInfo.AppKeyID = int.Parse(ddlAppKeyID.SelectedValue); modelTljInfo.ActiveCode = txtActiveCode.Text.Trim(); modelTljInfo.item_id = txtitem_id.Text.Trim(); modelTljInfo.goodsname = txtgoodsname.Text.Trim(); modelTljInfo.quan_link = txtquan_link.Text.Trim(); modelTljInfo.name = ddlname.SelectedValue; modelTljInfo.batch = int.Parse(txtbatch.Text.Trim()); modelTljInfo.total_num = int.Parse(txttotal_num.Text.Trim()); modelTljInfo.per_face = decimal.Parse(txtper_face.Text.Trim()); modelTljInfo.user_total_win_num_limit = int.Parse(txtuser_total_win_num_limit.Text.Trim()); modelTljInfo.send_start_time = DateTime.Parse(txtsend_start_time.Text.Trim()); modelTljInfo.send_end_time = DateTime.Parse(txtsend_end_time.Text.Trim()); modelTljInfo.use_end_time = int.Parse(txtuse_end_time.Text.Trim()); modelTljInfo.createtime = dtCreate; modelTljInfo.ifok = "未创建"; modelTljInfo.ifget = false; modelTljInfo.item_pic = txtitem_pic.Value; modelTljInfo.commission_bili = decimal.Parse(txtcommission_bili.Text.Trim()); modelTljInfo.quanPrice = decimal.Parse(txtquanPrice.Text.Trim()); modelTljInfo.zctime = DateTime.Now; modelTljInfo.remark = txtRemark.Text.Trim(); modelTljInfo.iftop = int.Parse(ddliftop.SelectedValue); modelTljInfo.campaigntype = ddlCampaignType.SelectedValue; modelTljInfo.PayMoney = decimal.Parse(txtpagePrice.Text.Trim()); decimal pagePrice = decimal.Parse(txtpagePrice.Text.Trim()); if ((pagePrice - modelTljInfo.per_face) == 0) { modelTljInfo.goodstype = "免单"; } if (pagePrice - modelTljInfo.per_face < 0) { modelTljInfo.goodstype = "负"; } modelTljInfo.AID = CurrentLoginAdmin.ID; bllTljInfo.Add(modelTljInfo); } Response.Cookies["zhanghaoid"].Value = modelTljInfo.AppKeyID.ToString(); //增加对账号的选择后 cookies的记录 Response.Cookies["zhanghaoid"].Expires = DateTime.Now.AddDays(100); Response.Write(PageFunc.ShowMsgJumpE("添加成功!", "TljList.aspx")); }
protected void BtnUpdate_Click(object sender, EventArgs e) { if (Request.QueryString["id"] != null) { int id = int.Parse(Request.QueryString["id"]); modelappkey = bllappkey.GetModel(id); modelappkey.AppKey = txtAppKey.Text.Trim(); modelappkey.AppSecret = txtAppSecret.Text.Trim(); modelappkey.AppName = txtAppName.Text.Trim(); modelappkey.TbAccount = txtTbAccount.Text.Trim(); modelappkey.IsDefault = chbIsDefault.Checked; bllappkey.Update(modelappkey); Response.Write(PageFunc.ShowMsgJumpE("更新成功!", "appkeyList.aspx")); } }
protected void BtnSubmit_Click(object sender, EventArgs e) { string username = txtUserName.Text.Trim(); var model = bllAdmin.GetModel(p => p.UserName.Equals(username)); if (model != null) { PageFunc.AjaxAlert(this.Page, "用户名已存在!"); return; } modelAdmin.UserName = username; modelAdmin.UserPwd = PageFunc.Encrypt(txtPwd.Text, 1); modelAdmin.AddTime = DateTime.Now; modelAdmin.Enabled = chbIsEnabled.Checked; modelAdmin.UserType = ddlUserType.SelectedValue; modelAdmin.Remark = txtRemark.Text.Trim(); modelAdmin.TbAccount = ddlAccount.SelectedValue; bllAdmin.Add(modelAdmin); Response.Write(PageFunc.ShowMsgJumpE("添加成功!", "AdminList.aspx")); }