⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lost.aspx.cs

📁 客户关系管理系统 客户关系管理系统
💻 CS
字号:
using System;
using System.Data;
using System.Configuration;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using MyCRM.BLL;
using MyCRM.Models;
//该源码下载自www.51aspx.com(51aspx.com)

public partial class client_lost : System.Web.UI.Page
{
    int count = 0;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            if (Session["User"] != null)
            {

                display();
               
            }
        }
    }
    protected void display()
    {
        GridView1.DataSource = LostManager.GetAllLost();
        GridView1.DataBind();
    }
    
   
    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            ImageButton img1 = (ImageButton)e.Row.FindControl("ImageButton1");
            ImageButton img2 = (ImageButton)e.Row.FindControl("ImageButton2");
            
            if (e.Row.Cells[5].Text.Trim() == "1")
            {
                e.Row.Cells[5].Text = "流失预警";
               
            }
            else if (e.Row.Cells[5].Text.Trim() == "2")
            {
                e.Row.Cells[5].Text = "暂缓流失";
                
            }
            else if (e.Row.Cells[5].Text.Trim() == "3")
            {
                e.Row.Cells[5].Text = "确认流失";
                img1.Visible = false;
                
                
            }

        }
    }
    protected void save_Click(object sender, EventArgs e)
    {
        soure();
    }
    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        string lostid = e.CommandArgument.ToString();
        string num = "a";
        if (e.CommandName == "OK")
        {

            Response.Redirect("newlost.aspx?lostid=" + Server.UrlEncode(lostid.Trim()) + "&num=" + Server.UrlEncode(num.Trim()) + "");
        }
        if (e.CommandName == "catchs")
        {

            Response.Redirect("newlost.aspx?lostid=" + Server.UrlEncode(lostid.Trim()) + "");
        }
    }
    protected void soure()
    {
        string names = name.Text.Trim();
        string titl = title.Text.Trim();
        string sta = ddl1.Text.Trim();
        GridView1.DataSource =LostManager.GetLostSelect( names, titl, sta);
        GridView1.DataBind();
        if (GridView1.DataSource == null)
        {
            count = 1;
        }
    }
    protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        GridView1.PageIndex = e.NewPageIndex;
        if (count == 1)
        {
            display();
        }
        else
        {
            soure();
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -