private void save_fapiao_info_zengzhi(HttpContext context) { Model.users model_user = new BasePage().GetUserInfo(); if (model_user == null) { context.Response.Write("{\"status\":\"0\", \"msg\":\"请先登录!\"}"); return; } string danweiname = DTRequest.GetFormString("danwei"); string shibiehao = DTRequest.GetFormString("shibiehao"); string address = DTRequest.GetFormString("address"); string tel = DTRequest.GetFormString("tel"); string bankname = DTRequest.GetFormString("bank"); string bankaccount = DTRequest.GetFormString("bankaccount"); BLL.fapiao bll = new BLL.fapiao(); Model.fapiao model = new Model.fapiao(); model.type = 2; model.danweiname = danweiname; model.shibiehao = shibiehao; model.address = address; model.tel = tel; model.bankname = bankname; model.bankaccount = bankaccount; model.userid = model_user.id; if (bll.Add(model) != 0) { context.Response.Write("{\"status\":1, \"msg\":\"保存成功!\"}"); return; } else { context.Response.Write("{\"status\":0, \"msg\":\"保存失败!\"}"); return; } }
private void save_fapiao_info_putong(HttpContext context) { Model.users model_user = new BasePage().GetUserInfo(); if (model_user == null) { context.Response.Write("{\"status\":\"0\", \"msg\":\"请先登录!\"}"); return; } string companyname = DTRequest.GetFormString("companyname"); string project = DTRequest.GetFormString("project"); string money = DTRequest.GetFormString("money"); BLL.fapiao bll = new BLL.fapiao(); Model.fapiao model = new Model.fapiao(); model.type = 1; model.companyname = companyname; model.project = project; model.aomunt = decimal.Parse(money); model.userid = model_user.id; if (bll.Add(model) != 0) { context.Response.Write("{\"status\":1, \"msg\":\"保存成功!\"}"); return; } else { context.Response.Write("{\"status\":0, \"msg\":\"保存失败!\"}"); return; } }