/// <summary> /// 锁定解锁名录:1=锁定,0=解锁 /// </summary> private void Lock() { MLMGC.Security.EnterprisePage ep = new MLMGC.Security.EnterprisePage(true); string ciids = nv["ids"]; int islock = Convert.ToInt32(nv["islock"]); if (!MLMGC.COMP.StringUtil.IsStringArrayList(ciids))//判断格式是否正确 格式:1,21,321 { HttpContext.Current.Response.Write("参数错误"); return; } if (islock > 1 || islock < 0) { HttpContext.Current.Response.Write("参数错误"); return; } E_ClientInfoHelper data = new E_ClientInfoHelper(); data.EnterpriseID = ep.EnterpriceID; data.EPUserTMRID = ep.EPUserTMRID; data.ClientInfoIDs = ciids; data.IsLock = islock; bool flag = new T_ClientInfoHelper().IsLock(data); //添加操作日志 new MLMGC.BLL.Enterprise.T_Log().Add(new MLMGC.DataEntity.Enterprise.E_Log() { EnterpriseID = bp.EnterpriceID, UserID = bp.UserID, LogTitle = "名录锁定与解锁", IP = MLMGC.COMP.Requests.GetRealIP() }); HttpContext.Current.Response.Write(flag ? "1" : "0"); }
/// <summary> /// 查询预约列表 /// </summary> /// <param name="data"></param> /// <returns></returns> /// <remarks>tianzhenyun 2011-11-07</remarks> public DataTable GetReservationList(E_ClientInfoHelper data) { SqlParameter[] parms = { new SqlParameter("@EnterpriseID", SqlDbType.Int), new SqlParameter("@EPUserTMRID", SqlDbType.Int), new SqlParameter("@StartDate", SqlDbType.SmallDateTime), new SqlParameter("@EndDate", SqlDbType.SmallDateTime), new SqlParameter("@PageIndex", SqlDbType.Int), new SqlParameter("@PageSize", SqlDbType.Int), new SqlParameter("@TotalCount", SqlDbType.Int) }; parms[0].Value = data.EnterpriseID; parms[1].Value = data.EPUserTMRID; parms[2].Value = data.Page.StartDate; parms[3].Value = data.Page.EndDate; parms[4].Value = data.Page.PageIndex; parms[5].Value = data.Page.PageSize; parms[6].Direction = ParameterDirection.Output; DataTable dt = DbHelperSQL.RunProcedureTable("ProcEP_B_ReservationS_ListSelect", parms); data.Page.TotalCount = parms[6].Value == DBNull.Value ? 0 : Convert.ToInt32(parms[6].Value); return(dt); }
/// <summary> /// 彻底删除按钮处理事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnDelete_Click(object sender, EventArgs e) { string ciids = hdClientInfoIDs.Value; hdClientInfoIDs.Value = ""; if (!MLMGC.COMP.StringUtil.IsStringArrayList(ciids))//判断格式是否正确 格式:1,21,321 { HttpContext.Current.Response.Write("参数错误"); return; } E_ClientInfoHelper data = new E_ClientInfoHelper(); data.EnterpriseID = EnterpriceID; data.ClientInfoIDs = ciids; bool flag = new T_ClientInfoHelper().LeaderThoroughDelete(data); if (flag) { Jscript.AlertAndRedirect(this, "删除成功", "Recycled.aspx"); } else { Jscript.ShowMsg("删除失败", this); } }
/// <summary> /// 查看录入人员录入名录统计信息 /// </summary> /// <param name="data"></param> /// <returns></returns> /// <remarks>tianzhenyun 2011-12-06</remarks> public DataTable GetInputStatistics(E_ClientInfoHelper data) { SqlParameter[] parms = { new SqlParameter("@EnterpriseID", SqlDbType.Int), new SqlParameter("@EPUserTMRID", SqlDbType.Int) }; parms[0].Value = data.EnterpriseID; parms[1].Value = data.EPUserTMRID; return(DbHelperSQL.RunProcedureTable("ProcEP_B_InputStatisticsSelect", parms)); }
/// <summary> /// 获取邮箱/手机 列表 /// </summary> /// <param name="data"></param> /// <returns></returns> /// <remarks>qipengfei 2011-11-08</remarks> public DataTable SelectOperate(E_ClientInfoHelper data) { SqlParameter[] parms = { new SqlParameter("@EnterpriseID", SqlDbType.Int), new SqlParameter("@ClientInfoIDs", SqlDbType.NVarChar) }; parms[0].Value = data.EnterpriseID; parms[1].Value = data.ClientInfoIDs; return(DbHelperSQL.RunProcedureTable("ProcEP_B_ClientInfoS_SelectOperate", parms)); }
/// <summary> /// 获取某一管理者所管理的所有管理角色信息 /// </summary> /// <param name="data"></param> /// <returns></returns> /// <remarks>qipengfei 2011-11-11</remarks> public DataTable GetLeaderRole(E_ClientInfoHelper data) { SqlParameter[] parms = { new SqlParameter("@EnterpriseID", SqlDbType.Int), new SqlParameter("@EPUserTMRID", SqlDbType.Int) }; parms[0].Value = data.EnterpriseID; parms[1].Value = data.EPUserTMRID; return(DbHelperSQL.RunProcedureTable("ProcEP_R_TeamModelRoleS_GetIsLeader", parms)); }
/// <summary> /// 按时间对比 /// </summary> /// <param name="data"></param> /// <returns></returns> /// <remarks>qipengfei 2011-11-11</remarks> public DataTable ComparisonDate(E_ClientInfoHelper data) { SqlParameter[] parms = { new SqlParameter("@EnterpriseID", SqlDbType.Int), new SqlParameter("@TeamID", SqlDbType.Int), new SqlParameter("@Flag", SqlDbType.NVarChar, 6) }; parms[0].Value = data.EnterpriseID; parms[1].Value = data.TeamID; parms[2].Value = data.Flag; return(DbHelperSQL.RunProcedureTable("ProcEP_B_ClientInfos_ComparisonDate", parms)); }
/// <summary> /// 彻底删除名录 /// </summary> /// <param name="data"></param> /// <returns></returns> /// <remarks>tianzhenyun 2012-02-15</remarks> public bool LeaderThoroughDelete(E_ClientInfoHelper data) { SqlParameter[] parms = { new SqlParameter("@EnterpriseID", SqlDbType.Int), new SqlParameter("@ClientInfoIDs", SqlDbType.NVarChar) }; parms[0].Value = data.EnterpriseID; parms[1].Value = data.ClientInfoIDs; int ReturnValue = 0; DbHelperSQL.RunProcedures("ProcEP_B_ClientInfoS_ThoroughDelete", parms, out ReturnValue); return(ReturnValue > 0);//修改成功 }
/// <summary> /// 判断电话和手机是否存在 /// </summary> /// <param name="data"></param> /// <returns></returns> /// <remarks>tianzhenyun 2012-02-09</remarks> public DataTable ExistsContact(E_ClientInfoHelper data) { SqlParameter[] parms = { new SqlParameter("@EnterpriseID", SqlDbType.Int), new SqlParameter("@ClientInfoID", SqlDbType.Int), new SqlParameter("@Type", SqlDbType.TinyInt), new SqlParameter("@Value", SqlDbType.VarChar, 16) }; parms[0].Value = data.EnterpriseID; parms[1].Value = data.ClientInfoID; parms[2].Value = data.Type; parms[3].Value = data.Value; return(DbHelperSQL.RunProcedureTable("ProcEP_B_ClientInfos_ExistsContact", parms)); }
/// <summary> /// 获取指定名录上一个、下一个 /// </summary> /// <param name="data"></param> /// <returns></returns> /// <remarks>qipengfei 2011-11-08</remarks> public DataTable PrevNext(E_ClientInfoHelper data) { SqlParameter[] parms = { new SqlParameter("@EnterpriseID", SqlDbType.Int), new SqlParameter("@EPUserTMRID", SqlDbType.Int), new SqlParameter("@ClientInfoID", SqlDbType.Int), new SqlParameter("@Status", SqlDbType.TinyInt), new SqlParameter("@IsReservation", SqlDbType.Bit) }; parms[0].Value = data.EnterpriseID; parms[1].Value = data.EPUserTMRID; parms[2].Value = data.ClientInfoID; parms[3].Value = data.Status; parms[4].Value = Convert.ToUInt16(data.IsReservation); return(DbHelperSQL.RunProcedureTable("ProcEP_B_ClientInfoS_PrevNext", parms)); }
protected void databind() { E_ClientInfoHelper data = new E_ClientInfoHelper(); T_ClientInfoHelper bll = new T_ClientInfoHelper(); data.EnterpriseID = EnterpriceID; data.EPUserTMRID = EPUserTMRID; data.TeamID = TeamID; data.Flag = flag; DataTable dt = bll.ComparisonDate(data); rpListDate.DataSource = dt; rpListDate.DataBind(); rpList.DataSource = dt; rpList.DataBind(); }
/// <summary> /// 按销售人员对比 /// </summary> /// <param name="data"></param> /// <returns></returns> /// <remarks>qipengfei 2011-11-10</remarks> public DataTable ComparisonSalesman(E_ClientInfoHelper data) { SqlParameter[] parms = { new SqlParameter("@EnterpriseID", SqlDbType.Int), new SqlParameter("@EPUserTMRID", SqlDbType.Int), new SqlParameter("@TeamID", SqlDbType.Int), new SqlParameter("@StartDate", SqlDbType.SmallDateTime), new SqlParameter("@EndDate", SqlDbType.SmallDateTime) }; parms[0].Value = data.EnterpriseID; parms[1].Value = data.EPUserTMRID; parms[2].Value = data.TeamID; parms[3].Value = data.Page.StartDate; parms[4].Value = data.Page.EndDate; return(DbHelperSQL.RunProcedureTable("ProcEP_B_ClientInfos_ComparisonUser", parms)); }
/// <summary> /// 获取按属性对比 /// </summary> /// <param name="data"></param> /// <param name="Flag">source/area/trade</param> /// <returns></returns> /// <remarks>qipengfei 2011-11-10</remarks> public DataTable ComparisonProperty(E_ClientInfoHelper data, string Flag) { SqlParameter[] parms = { new SqlParameter("@EnterpriseID", SqlDbType.Int), new SqlParameter("@EPUserTMRID", SqlDbType.Int), new SqlParameter("@Flag", SqlDbType.NVarChar,6), new SqlParameter("@StartDate", SqlDbType.SmallDateTime), new SqlParameter("@EndDate", SqlDbType.SmallDateTime) }; parms[0].Value = data.EnterpriseID; parms[1].Value = data.EPUserTMRID; parms[2].Value = Flag; parms[3].Value = data.Page.StartDate; parms[4].Value = data.Page.EndDate; return(DbHelperSQL.RunProcedureTable("ProcEP_B_ClientInfoS_ComparisonProperty", parms)); }
/// <summary> /// 业务锁定或解锁名录:1=锁定,0=解锁 /// </summary> /// <param name="data"></param> /// <returns></returns> /// <remarks>tianzhenyun 2012-1-4</remarks> public bool IsLock(E_ClientInfoHelper data) { SqlParameter[] parms = { new SqlParameter("@EnterpriseID", SqlDbType.Int), new SqlParameter("@ClientInfoIDs", SqlDbType.NVarChar), new SqlParameter("@EPUserTMRID", SqlDbType.Int), new SqlParameter("@IsLock", SqlDbType.TinyInt) }; parms[0].Value = data.EnterpriseID; parms[1].Value = data.ClientInfoIDs; parms[2].Value = data.EPUserTMRID; parms[3].Value = data.IsLock; int ReturnValue; DbHelperSQL.RunProcedures("ProcEP_B_ClientItem_Lock", parms, out ReturnValue); return(ReturnValue > 0); }
/// <summary> /// 绑定数据 /// </summary> protected void databind() { E_ClientInfoHelper data = new E_ClientInfoHelper(); data.EnterpriseID = EnterpriceID; data.EPUserTMRID = EPUserTMRID; string start = Requests.GetQueryString("startdate"); string end = Requests.GetQueryString("enddate"); //分页参数 data.Page = new MLMGC.DataEntity.E_Page(); data.Page.PageSize = pageSize; data.Page.PageIndex = pageIndex; if (start != "") { data.Page.StartDate = Convert.ToDateTime(start); } else { data.Page.StartDate = DateTime.Now; } if (end != "") { data.Page.EndDate = Convert.ToDateTime(end); } else { data.Page.EndDate = DateTime.Now.AddDays(1); } txtStartDate.Text = Convert.ToDateTime(data.Page.StartDate).ToString("yyyy-MM-dd"); txtEndDate.Text = Convert.ToDateTime(data.Page.EndDate).ToString("yyyy-MM-dd"); rpList.DataSource = new T_ClientInfoHelper().GetReservationList(data); rpList.DataBind(); //设置分页样式 pageList1.PageSize = pageSize; pageList1.CurrentPageIndex = pageIndex; pageList1.RecordCount = data.Page.TotalCount; pageList1.CustomInfoHTML = string.Format("共有记录 <span class='red_font'>{0}</span> 条", pageList1.RecordCount); pageList1.TextAfterPageIndexBox = " 页/" + pageList1.PageCount + " "; }
protected void databind() { E_ClientInfoHelper data = new E_ClientInfoHelper(); T_ClientInfoHelper bll = new T_ClientInfoHelper(); data.EnterpriseID = EnterpriceID; data.EPUserTMRID = EPUserTMRID; data.Page = new MLMGC.DataEntity.E_Page(); DateTime dtStart, dtEnd; if (DateTime.TryParse(txtStartDate.Text, out dtStart)) { data.Page.StartDate = dtStart; } if (DateTime.TryParse(txtEndDate.Text, out dtEnd)) { data.Page.EndDate = dtEnd; } rpList.DataSource = bll.ComparisonProperty(data, flag); rpList.DataBind(); }
/// <summary> /// 获取按属性对比 /// </summary> /// <param name="data"></param> /// <param name="Flag">source/area/trade</param> /// <returns></returns> /// <remarks>qipengfei 2011-11-10</remarks> public DataTable ComparisonProperty(E_ClientInfoHelper data, string Flag) { return(dal.ComparisonProperty(data, Flag)); }
/// <summary> /// 获取邮箱/手机 列表 /// </summary> /// <param name="data"></param> /// <returns></returns> /// <remarks>qipengfei 2011-11-08</remarks> public DataTable SelectOperate(E_ClientInfoHelper data) { return(dal.SelectOperate(data)); }
/// <summary> /// 获取指定名录上一个、下一个 /// </summary> /// <param name="data"></param> /// <returns></returns> /// <remarks>qipengfei 2011-11-08</remarks> public DataTable PrevNext(E_ClientInfoHelper data) { return(dal.PrevNext(data)); }
/// <summary> /// 按销售人员对比 /// </summary> /// <param name="data"></param> /// <returns></returns> /// <remarks>qipengfei 2011-11-10</remarks> public DataTable ComparisonSalesman(E_ClientInfoHelper data) { return(dal.ComparisonSalesman(data)); }
/// <summary> /// 彻底删除名录 /// </summary> /// <param name="data"></param> /// <returns></returns> /// <remarks>tianzhenyun 2012-02-15</remarks> public bool LeaderThoroughDelete(E_ClientInfoHelper data) { return(dal.LeaderThoroughDelete(data)); }
/// <summary> /// 判断电话和手机是否存在 /// </summary> /// <param name="data"></param> /// <returns></returns> /// <remarks>tianzhenyun 2012-02-09</remarks> public DataTable ExistsContact(E_ClientInfoHelper data) { return(dal.ExistsContact(data)); }
/// <summary> /// 业务锁定或解锁名录:1=锁定,0=解锁 /// </summary> /// <param name="data"></param> /// <returns></returns> /// <remarks>tianzhenyun 2012-1-4</remarks> public bool IsLock(E_ClientInfoHelper data) { return(dal.IsLock(data)); }
/// <summary> /// 查看录入人员录入名录统计信息 /// </summary> /// <param name="data"></param> /// <returns></returns> /// <remarks>tianzhenyun 2011-12-06</remarks> //TODO:该方法未使用 public DataTable GetInputStatistics(E_ClientInfoHelper data) { return(dal.GetInputStatistics(data)); }
/// <summary> /// 获取某一管理者所管理的所有管理角色信息 /// </summary> /// <param name="data"></param> /// <returns></returns> /// <remarks>qipengfei 2011-11-11</remarks> public DataTable GetLeaderRole(E_ClientInfoHelper data) { return(dal.GetLeaderRole(data)); }
/// <summary> /// 按时间对比 /// </summary> /// <param name="data"></param> /// <returns></returns> /// <remarks>qipengfei 2011-11-11</remarks> public DataTable ComparisonDate(E_ClientInfoHelper data) { return(dal.ComparisonDate(data)); }
/// <summary> /// 把报废或失败的名录上报给上级 /// </summary> /// <param name="data"></param> /// <returns></returns> /// <remarks>tianzhenyun 2011-11-28</remarks> public bool Report(E_ClientInfoHelper data) { return(dal.Report(data)); }
/// <summary> /// 查询预约列表 /// </summary> /// <param name="data"></param> /// <returns></returns> /// <remarks>tianzhenyun 2011-11-07</remarks> public DataTable GetReservationList(E_ClientInfoHelper data) { return(dal.GetReservationList(data)); }