/// <summary> /// 获取代理商充值提醒 /// </summary> /// <param name="flowId">流水号</param> /// <returns>代理商充值提醒对象</returns> public virtual TTAgentRechargeNotice Get(long flowId) { TTAgentRechargeNotice ttAgentRechargeNotice = null; try { string strSQL = "select * from TTAgentRechargeNotice where flowId=@flowId"; Param param = new Param(); param.Clear(); param.Add("@flowId", flowId); db.Open(); ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param); if (dr.Read()) { ttAgentRechargeNotice = ReadData(dr); } dr.Close(); } catch (Exception e) { throw e; } finally { db.Close(); } return(ttAgentRechargeNotice); }
public void ProcessRequest(HttpContext context) { try { LoginUser loginUser = new LoginUser(context, "AgentRechargeNotice"); if (!loginUser.Pass)//权限验证 { return; } //加载DataGrid if (context.Request["action"] == "gridLoad") { AgentRechargeNoticeBLL bll = new AgentRechargeNoticeBLL(context, loginUser); int page = int.Parse(context.Request["page"]); int rows = int.Parse(context.Request["rows"]); string startDate = context.Request["startDate"]; string endDate = context.Request["endDate"]; bll.LoadGrid(page, rows, "", startDate, endDate); return; } //办理状态 if (context.Request["action"] == "dealWSListLoad") { Combobox com = new Combobox(context, loginUser); com.DealWSCombobox(); } //加载信息 if (context.Request["action"] == "load") { AgentRechargeNoticeBLL bll = new AgentRechargeNoticeBLL(context, loginUser); long flowId = long.Parse(context.Request["flowId"]);//编号 bll.Load(flowId); return; } //修改 if (context.Request["action"] == "edit") { AgentRechargeNoticeBLL bll = new AgentRechargeNoticeBLL(context, loginUser); TTAgentRechargeNotice ttAgentRechargeNotice = new TTAgentRechargeNotice(); ttAgentRechargeNotice.flowId = long.Parse(context.Request["flowId"]); //编号 ttAgentRechargeNotice.dealWithStatus = context.Request["dealWithStatus"]; //办理状态 ttAgentRechargeNotice.remark = context.Request["remark"]; //说明 ttAgentRechargeNotice.operatorId = loginUser.UserId; //办理人编号 ttAgentRechargeNotice.operatorName = loginUser.UserName; //办理人名称 ttAgentRechargeNotice.opinion = context.Request["opinion"]; //办理意见 ttAgentRechargeNotice.dealWithTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); //办理意见 bll.Edit(ttAgentRechargeNotice); return; } } catch (Exception e) { Message.error(context, e.Message); } }
/// <summary> /// 加载指定代理商充值提醒 /// <param name="flowId">流水号</param> /// </summary> public void Load(long flowId) { try { TTAgentRechargeNotice ttAgentRechargeNotice = ttAgentRechargeNoticeDAO.Get(flowId); WebJson.ToJson(context, ttAgentRechargeNotice); } catch (Exception e) { Message.error(context, e.Message); } }
/// <summary> /// 增加代理商充值提醒 /// <param name="ttAgentRechargeNotice">代理商充值提醒</param> /// </summary> public void Add(TTAgentRechargeNotice ttAgentRechargeNotice) { try { ttAgentRechargeNoticeDAO.Add(ttAgentRechargeNotice); Message.success(context, "代理商充值提醒增加成功"); loginSession.Log(ttAgentRechargeNotice.agentName + "代理商充值提醒增加成功"); } catch (Exception e) { Message.error(context, "代理商充值提醒增加失败"); loginSession.Log(e.Message); } }
/// <summary> /// 修改代理商充值提醒 /// <param name="data">数据库连接</param> /// <param name="ttAgentRechargeNotice">代理商充值提醒</param> /// </summary> public override void Edit(DataAccess data, TTAgentRechargeNotice ttAgentRechargeNotice) { string strSQL = "update TTAgentRechargeNotice set dealWithStatus=@dealWithStatus,operatorId=@operatorId,operatorName=@operatorName,opinion=@opinion,dealWithTime=To_date(@dealWithTime,'yyyy-mm-dd hh24:mi:ss') where flowId=@flowId"; Param param = new Param(); param.Clear(); param.Add("@dealWithStatus", ttAgentRechargeNotice.dealWithStatus); //办理状态 param.Add("@operatorId", ttAgentRechargeNotice.operatorId); //办理人编号 param.Add("@operatorName", ttAgentRechargeNotice.operatorName); //办理人名称 param.Add("@opinion", ttAgentRechargeNotice.opinion); //办理意见 param.Add("@dealWithTime", ttAgentRechargeNotice.dealWithTime); //办理时间 param.Add("@flowId", ttAgentRechargeNotice.flowId); //流水号 data.ExecuteNonQuery(CommandType.Text, strSQL, param); }
/// <summary> /// 增加代理商充值提醒 /// <param name="data">数据库连接</param> /// <param name="ttAgentRechargeNotice">代理商充值提醒</param> /// </summary> public override void Add(DataAccess data, TTAgentRechargeNotice ttAgentRechargeNotice) { string strSQL = "insert into TTAgentRechargeNotice (flowId,agentId,agentName,fee,bankAccountId,dealWithStatus,transferAccDate,remark) values (SAgentRechargeNotice_flowId.Nextval,@agentId,@agentName,@fee,@bankAccountId,@dealWithStatus,To_date(@transferAccDate,'yyyy-mm-dd hh24:mi:ss'),@remark)"; Param param = new Param(); param.Clear(); param.Add("@agentId", ttAgentRechargeNotice.agentId); //代理商编号 param.Add("@agentName", ttAgentRechargeNotice.agentName); //代理商名称 param.Add("@fee", ttAgentRechargeNotice.fee); //提现金额 param.Add("@bankAccountId", ttAgentRechargeNotice.bankAccountId); //银行账号 param.Add("@dealWithStatus", ttAgentRechargeNotice.dealWithStatus); //办理状态 param.Add("@transferAccDate", ttAgentRechargeNotice.transferAccDate); //转账日期 param.Add("@remark", ttAgentRechargeNotice.remark); //提现说明 data.ExecuteNonQuery(CommandType.Text, strSQL, param); }
/// <summary> /// 修改代理商充值提醒 /// </summary> /// <param name="ttAgentRechargeNotice">代理商充值提醒</param> public virtual void Edit(TTAgentRechargeNotice ttAgentRechargeNotice) { try { db.Open(); Edit(db, ttAgentRechargeNotice); } catch (Exception e) { throw e; } finally { db.Close(); } }
/// <summary> /// 增加代理商充值提醒 /// <param name="ttAgentRechargeNotice">代理商充值提醒</param> /// </summary> public void Add(TTAgentRechargeNotice ttAgentRechargeNotice) { try { db.Open(); Add(db, ttAgentRechargeNotice); } catch (Exception e) { throw e; } finally { db.Close(); } }
/// <summary> /// 修改代理商充值提醒 /// </summary> /// <param name="data">数据库连接</param> /// <param name="ttAgentRechargeNotice">代理商充值提醒</param> public virtual void Edit(DataAccess data, TTAgentRechargeNotice ttAgentRechargeNotice) { string strSQL = "update TTAgentRechargeNotice set agentId=@agentId,agentName=@agentName,fee=@fee,bankAccountId=@bankAccountId,transferAccDate=To_date(@transferAccDate,'yyyy-mm-dd hh24:mi:ss'),remark=@remark,createTime=To_date(@createTime,'yyyy-mm-dd hh24:mi:ss'),dealWithStatus=@dealWithStatus,operatorId=@operatorId,operatorName=@operatorName,dealWithTime=To_date(@dealWithTime,'yyyy-mm-dd hh24:mi:ss'),opinion=@opinion where flowId=@flowId"; Param param = new Param(); param.Clear(); param.Add("@agentId", ttAgentRechargeNotice.agentId); //代理商编号 param.Add("@agentName", ttAgentRechargeNotice.agentName); //代理商名称 param.Add("@fee", ttAgentRechargeNotice.fee); //充值金额 param.Add("@bankAccountId", ttAgentRechargeNotice.bankAccountId); //银行账号 param.Add("@transferAccDate", ttAgentRechargeNotice.transferAccDate); //转账日期 param.Add("@remark", ttAgentRechargeNotice.remark); //充值说明 param.Add("@createTime", ttAgentRechargeNotice.createTime); //创建时间 param.Add("@dealWithStatus", ttAgentRechargeNotice.dealWithStatus); //办理状态 param.Add("@operatorId", ttAgentRechargeNotice.operatorId); //办理人编号 param.Add("@operatorName", ttAgentRechargeNotice.operatorName); //办理人名称 param.Add("@dealWithTime", ttAgentRechargeNotice.dealWithTime); //办理时间 param.Add("@opinion", ttAgentRechargeNotice.opinion); //办理意见 param.Add("@flowId", ttAgentRechargeNotice.flowId); //流水号 data.ExecuteNonQuery(CommandType.Text, strSQL, param); }
protected DataAccess db = new DataAccess(DataAccess.DBConn);//数据库连接 #region 代码生成器自动生成 /// <summary> /// 增加代理商充值提醒 /// </summary> /// <param name="data">数据库连接</param> /// <param name="ttAgentRechargeNotice">代理商充值提醒</param> public virtual void Add(DataAccess data, TTAgentRechargeNotice ttAgentRechargeNotice) { string strSQL = "insert into TTAgentRechargeNotice (flowId,agentId,agentName,fee,bankAccountId,transferAccDate,remark,createTime,dealWithStatus,operatorId,operatorName,dealWithTime,opinion) values (@flowId,@agentId,@agentName,@fee,@bankAccountId,To_date(@transferAccDate,'yyyy-mm-dd hh24:mi:ss'),@remark,To_date(@createTime,'yyyy-mm-dd hh24:mi:ss'),@dealWithStatus,@operatorId,@operatorName,To_date(@dealWithTime,'yyyy-mm-dd hh24:mi:ss'),@opinion)"; Param param = new Param(); param.Clear(); param.Add("@flowId", ttAgentRechargeNotice.flowId); //流水号 param.Add("@agentId", ttAgentRechargeNotice.agentId); //代理商编号 param.Add("@agentName", ttAgentRechargeNotice.agentName); //代理商名称 param.Add("@fee", ttAgentRechargeNotice.fee); //充值金额 param.Add("@bankAccountId", ttAgentRechargeNotice.bankAccountId); //银行账号 param.Add("@transferAccDate", ttAgentRechargeNotice.transferAccDate); //转账日期 param.Add("@remark", ttAgentRechargeNotice.remark); //充值说明 param.Add("@createTime", ttAgentRechargeNotice.createTime); //创建时间 param.Add("@dealWithStatus", ttAgentRechargeNotice.dealWithStatus); //办理状态 param.Add("@operatorId", ttAgentRechargeNotice.operatorId); //办理人编号 param.Add("@operatorName", ttAgentRechargeNotice.operatorName); //办理人名称 param.Add("@dealWithTime", ttAgentRechargeNotice.dealWithTime); //办理时间 param.Add("@opinion", ttAgentRechargeNotice.opinion); //办理意见 data.ExecuteNonQuery(CommandType.Text, strSQL, param); }
/// <summary> /// 读取代理商充值提醒信息 /// </summary> /// <param name="dr">记录指针</param> /// <returns>代理商充值提醒对象</returns> protected virtual TTAgentRechargeNotice ReadData(ComDataReader dr) { TTAgentRechargeNotice ttAgentRechargeNotice = new TTAgentRechargeNotice(); ttAgentRechargeNotice.flowId = long.Parse(dr["flowId"].ToString()); //流水号 ttAgentRechargeNotice.agentId = dr["agentId"].ToString(); //代理商编号 ttAgentRechargeNotice.agentName = dr["agentName"].ToString(); //代理商名称 ttAgentRechargeNotice.fee = double.Parse(dr["fee"].ToString()); //充值金额 ttAgentRechargeNotice.bankAccountId = dr["bankAccountId"].ToString(); //银行账号 if (dr["transferAccDate"] == null) { ttAgentRechargeNotice.transferAccDate = "";//转账日期 } else { ttAgentRechargeNotice.transferAccDate = string.Format("{0:yyyy-MM-dd HH:mm:ss}", dr["transferAccDate"]); //转账日期 } ttAgentRechargeNotice.remark = dr["remark"].ToString(); //充值说明 if (dr["createTime"] == null) { ttAgentRechargeNotice.createTime = "";//创建时间 } else { ttAgentRechargeNotice.createTime = string.Format("{0:yyyy-MM-dd HH:mm:ss}", dr["createTime"]); //创建时间 } ttAgentRechargeNotice.dealWithStatus = dr["dealWithStatus"].ToString(); //办理状态 ttAgentRechargeNotice.operatorId = dr["operatorId"].ToString(); //办理人编号 ttAgentRechargeNotice.operatorName = dr["operatorName"].ToString(); //办理人名称 if (dr["dealWithTime"] == null) { ttAgentRechargeNotice.dealWithTime = "";//办理时间 } else { ttAgentRechargeNotice.dealWithTime = string.Format("{0:yyyy-MM-dd HH:mm:ss}", dr["dealWithTime"]); //办理时间 } ttAgentRechargeNotice.opinion = dr["opinion"].ToString(); //办理意见 return(ttAgentRechargeNotice); }
public void ProcessRequest(HttpContext context) { try { LoginAgentUser loginAgentUser = new LoginAgentUser(context, "AgentRechargeNotice"); AgentRoleBLL agentRoleBLL = new AgentRoleBLL(context, loginAgentUser); StaffBLL staffBll = new StaffBLL(context, loginAgentUser); if (!loginAgentUser.Pass)//权限验证 { return; } //获取用户登录的角色类型 0为 代理商 1 为员工 string roleType = agentRoleBLL.GetRoleType(loginAgentUser.RoleIds); string agentId = ""; if (roleType == "0") { agentId = loginAgentUser.UserId; } else { agentId = staffBll.Get(loginAgentUser.UserId).agentId; } //加载DataGrid if (context.Request["action"] == "gridLoad") { AgentRechargeNoticeBLL bll = new AgentRechargeNoticeBLL(context, loginAgentUser); int page = int.Parse(context.Request["page"]); int rows = int.Parse(context.Request["rows"]); string startDate = context.Request["startDate"]; string endDate = context.Request["endDate"]; bll.LoadGrid(page, rows, agentId, startDate, endDate); return; } //加载信息 if (context.Request["action"] == "load") { AgentRechargeNoticeBLL bll = new AgentRechargeNoticeBLL(context, loginAgentUser); long flowId = long.Parse(context.Request["flowId"]);//流水号 bll.Load(flowId); return; } //增加 if (context.Request["action"] == "add") { AgentRechargeNoticeBLL bll = new AgentRechargeNoticeBLL(context, loginAgentUser); TTAgentRechargeNotice ttAgentRechargeNotice = new TTAgentRechargeNotice(); ttAgentRechargeNotice.agentId = loginAgentUser.UserId; //代理商编号 ttAgentRechargeNotice.agentName = loginAgentUser.GetUserName(); //代理商名称 ttAgentRechargeNotice.fee = double.Parse(context.Request["fee"]); //充值金额 ttAgentRechargeNotice.bankAccountId = context.Request["bankAccountId"]; //银行账号 ttAgentRechargeNotice.transferAccDate = DateTime.Parse(context.Request["transferAccDate"]).ToString("yyyy-MM-dd HH:mm:ss"); //转账日期 ttAgentRechargeNotice.remark = context.Request["remark"]; //充值说明 ttAgentRechargeNotice.dealWithStatus = "0"; bll.Add(ttAgentRechargeNotice); return; } //修改 if (context.Request["action"] == "edit") { AgentRechargeNoticeBLL bll = new AgentRechargeNoticeBLL(context, loginAgentUser); TTAgentRechargeNotice ttAgentRechargeNotice = new TTAgentRechargeNotice(); ttAgentRechargeNotice.flowId = long.Parse(context.Request["flowId"]); //流水号 ttAgentRechargeNotice.agentId = context.Request["agentId"]; //代理商编号 ttAgentRechargeNotice.agentName = context.Request["agentName"]; //代理商名称 ttAgentRechargeNotice.fee = double.Parse(context.Request["fee"]); //充值金额 ttAgentRechargeNotice.bankAccountId = context.Request["bankAccountId"]; //银行账号 ttAgentRechargeNotice.transferAccDate = context.Request["transferAccDate"]; //转账日期 ttAgentRechargeNotice.remark = context.Request["remark"]; //充值说明 ttAgentRechargeNotice.createTime = context.Request["createTime"]; //创建时间 ttAgentRechargeNotice.dealWithStatus = context.Request["dealWithStatus"]; //办理状态 ttAgentRechargeNotice.operatorId = context.Request["operatorId"]; //办理人编号 ttAgentRechargeNotice.operatorName = context.Request["operatorName"]; //办理人名称 ttAgentRechargeNotice.dealWithTime = context.Request["dealWithTime"]; //办理时间 ttAgentRechargeNotice.opinion = context.Request["opinion"]; //办理意见 bll.Edit(ttAgentRechargeNotice); return; } //删除 if (context.Request["action"] == "delete") { AgentRechargeNoticeBLL bll = new AgentRechargeNoticeBLL(context, loginAgentUser); long flowId = long.Parse(context.Request["flowId"]);//流水号 bll.Delete(flowId); return; } } catch (Exception e) { Message.error(context, e.Message); } }