예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string id = "";

            //CheckBoxList_Reciever初始化
            if (!IsPostBack)
            {
                try
                {
                    id = Request.QueryString[0].ToString();
                    this.Label1.Text = id;
                }
                catch { }

                if (id == "")
                {
                    this.begindate.Text = DateTime.Now.ToShortDateString();
                    this.enddate.Text   = DateTime.Now.AddDays(7).ToShortDateString();
                }

                else
                {
                    //绑定CheckBoxList前面的部分
                    Maticsoft.BLL.W_Material   bll2  = new Maticsoft.BLL.W_Material();
                    Maticsoft.Model.W_Material model = new Maticsoft.Model.W_Material();
                    model               = bll2.GetModel(int.Parse(id));
                    this.Name.Text      = model.Name;
                    this.begindate.Text = (Convert.ToDateTime(model.Begindate)).ToShortDateString();
                    this.enddate.Text   = (Convert.ToDateTime(model.Enddate)).ToShortDateString();
                    //绑定是否显示过期
                    if (model.Outdisplay == "是")
                    {
                        this.CheckBox1.Checked = true;
                    }
                    //绑定CheckBoxList
                    DataSet ds = new DataSet();
                    Maticsoft.BLL.W_Receiver bll = new Maticsoft.BLL.W_Receiver();
                    ds = bll.W_Receiver_Mid(id);
                    this.CheckBoxList_Reciever.DataSource = ds;
                    CheckBoxList_Reciever.DataTextField   = "Receiver";
                    CheckBoxList_Reciever.DataValueField  = "Id";
                    CheckBoxList_Reciever.DataBind();

                    //添加选定内容 陈湘军 
                    //修改存储过程 W_Receiver_Mid,添加dormacy字段

                    if (ds != null && ds.Tables[0].Rows.Count > 0)
                    {
                        for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                        {
                            try
                            {
                                CheckBoxList_Reciever.Items[i].Selected = (ds.Tables[0].Rows[i]["dormacy"].ToString() == "提交");
                            }
                            catch { }
                        }
                    }
                }
            }
        }
예제 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string id = "";
            //CheckBoxList_Reciever初始化
            if (!IsPostBack)
            {
                try
                {
                    id = Request.QueryString[0].ToString();
                    this.Label1.Text  = id;
                }
                catch { }
                DataSet ds = new DataSet();
                Maticsoft.BLL.W_Receiver bll = new Maticsoft.BLL.W_Receiver();
                ds = bll.GetAllList();
                this.CheckBoxList_Reciever.DataSource = ds;
                CheckBoxList_Reciever.DataTextField = "Receiver";
                CheckBoxList_Reciever.DataValueField = "Id";
                CheckBoxList_Reciever.DataBind();
                 if (id == "")
                {
                    this.TextBox_Address.Text = "http://kjc.jstu.edu.cn/news.aspx?id=205";
                    this.TextBox_Number.Text = "申报书一式三份,活页7份";
                    this.begindate.Text = DateTime.Now.ToShortDateString();
                    this.enddate.Text = DateTime.Now.AddDays(7).ToShortDateString();
                }

                else
                {
                    Maticsoft.BLL.W_Material bll2 = new Maticsoft.BLL.W_Material();
                    Maticsoft.Model.W_Material model = new Maticsoft.Model.W_Material();
                    model = bll2.GetModel(int.Parse( id));
                    this.Name.Text = model.Name;
                    this.begindate.Text = (Convert.ToDateTime( model.Begindate)).ToShortDateString();
                    this.enddate.Text = (Convert.ToDateTime(model.Enddate)).ToShortDateString();
                    this.TextBox_Address.Text = model.Address;
                    this.TextBox_Number.Text = model.Number;

                    DataSet ds2 = new DataSet();
                    Maticsoft.BLL.W_Receivestate bll3 = new Maticsoft.BLL.W_Receivestate();
                    ds2 = bll3.GetList("MaterialId=" + id);
                    for (int i = 0; i < ds2.Tables[0].Rows.Count; i++)
                    {
                       int j = int.Parse(ds2.Tables[0].Rows[i][2].ToString());
                       this.CheckBoxList_Reciever.Items[j-1].Selected=true ;
                        
                    
                     }
                
                }
            }
            
        }
예제 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string id = "";

            //CheckBoxList_Reciever初始化
            if (!IsPostBack)
            {
                try
                {
                    id = Request.QueryString[0].ToString();
                    this.Label1.Text = id;
                }
                catch { }
                DataSet ds = new DataSet();
                Maticsoft.BLL.W_Receiver bll = new Maticsoft.BLL.W_Receiver();
                ds = bll.GetAllList();
                this.CheckBoxList_Reciever.DataSource = ds;
                CheckBoxList_Reciever.DataTextField   = "Receiver";
                CheckBoxList_Reciever.DataValueField  = "Id";
                CheckBoxList_Reciever.DataBind();
                if (id == "")
                {
                    this.TextBox_Address.Text = "http://kjc.jstu.edu.cn/news.aspx?id=205";
                    this.TextBox_Number.Text  = "申报书一式三份,活页7份";
                    this.begindate.Text       = DateTime.Now.ToShortDateString();
                    this.enddate.Text         = DateTime.Now.AddDays(7).ToShortDateString();
                }

                else
                {
                    Maticsoft.BLL.W_Material   bll2  = new Maticsoft.BLL.W_Material();
                    Maticsoft.Model.W_Material model = new Maticsoft.Model.W_Material();
                    model                     = bll2.GetModel(int.Parse(id));
                    this.Name.Text            = model.Name;
                    this.begindate.Text       = (Convert.ToDateTime(model.Begindate)).ToShortDateString();
                    this.enddate.Text         = (Convert.ToDateTime(model.Enddate)).ToShortDateString();
                    this.TextBox_Address.Text = model.Address;
                    this.TextBox_Number.Text  = model.Number;

                    DataSet ds2 = new DataSet();
                    Maticsoft.BLL.W_Receivestate bll3 = new Maticsoft.BLL.W_Receivestate();
                    ds2 = bll3.GetList("MaterialId=" + id);
                    for (int i = 0; i < ds2.Tables[0].Rows.Count; i++)
                    {
                        int j = int.Parse(ds2.Tables[0].Rows[i][2].ToString());
                        this.CheckBoxList_Reciever.Items[j - 1].Selected = true;
                    }
                }
            }
        }
예제 #4
0
        ////材料搜索
        //protected void BtnSearch_Click(object sender, ImageClickEventArgs e)
        //{

        //}

        //TreeView的绑定操作
        protected void TreeBind()
        {
            DataSet ds = new DataSet();

            Maticsoft.BLL.W_Receiver bll = new Maticsoft.BLL.W_Receiver();
            ds = bll.GetAllList();
            TreeNode tree1 = new TreeNode("学院信息", "0");

            this.TreeView1.Nodes.Add(tree1);
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                TreeNode tree2 = new TreeNode(ds.Tables[0].Rows[i][1].ToString(), ds.Tables[0].Rows[i][0].ToString());
                tree1.ChildNodes.Add(tree2);
            }
        }
예제 #5
0
        ////材料搜索
        //protected void BtnSearch_Click(object sender, ImageClickEventArgs e)
        //{
           
        //}

        //TreeView的绑定操作
        protected void TreeBind()
        {
            DataSet ds = new DataSet();
            Maticsoft.BLL.W_Receiver bll = new Maticsoft.BLL.W_Receiver();
            ds = bll.GetAllList();
            TreeNode tree1 = new TreeNode("学院信息","0");
            this.TreeView1.Nodes.Add(tree1);
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                TreeNode tree2 = new TreeNode(ds.Tables[0].Rows[i][1].ToString(), ds.Tables[0].Rows[i][0].ToString());
                tree1.ChildNodes.Add(tree2);

            }
        
        
        }
예제 #6
0
        protected void Page_Load(object sender, EventArgs e)
        {


            string id = "";
            //CheckBoxList_Reciever初始化
            if (!IsPostBack)
            {
                try
                {
                    id = Request.QueryString[0].ToString();
                    this.Label1.Text = id;
                }
                catch { }

                if (id == "")
                {
                    this.begindate.Text = DateTime.Now.ToShortDateString();
                    this.enddate.Text = DateTime.Now.AddDays(7).ToShortDateString();
                }

                else
                {
                    //绑定CheckBoxList前面的部分
                    Maticsoft.BLL.W_Material bll2 = new Maticsoft.BLL.W_Material();
                    Maticsoft.Model.W_Material model = new Maticsoft.Model.W_Material();
                    model = bll2.GetModel(int.Parse(id));
                    this.Name.Text = model.Name;
                    this.begindate.Text = (Convert.ToDateTime(model.Begindate)).ToShortDateString();
                    this.enddate.Text = (Convert.ToDateTime(model.Enddate)).ToShortDateString();
                    //绑定CheckBoxList
                    DataSet ds = new DataSet();
                    Maticsoft.BLL.W_Receiver bll = new Maticsoft.BLL.W_Receiver();
                    ds = bll.W_Receiver_Mid(id);
                    this.CheckBoxList_Reciever.DataSource = ds;
                    CheckBoxList_Reciever.DataTextField = "Receiver";
                    CheckBoxList_Reciever.DataValueField = "Id";
                    CheckBoxList_Reciever.DataBind();




                }
            }
            
        }
예제 #7
0
        protected void Bind(int Id)
        {
            Maticsoft.BLL.W_Material bll = new Maticsoft.BLL.W_Material();
            Maticsoft.Model.W_Material model = new Maticsoft.Model.W_Material();
            model = bll.GetModel(Id);
            this.lblId.Text = model.Id.ToString();
            this.lblName.Text = model.Name;
            this.lblBeginDate.Text = (Convert.ToDateTime(model.Begindate)).ToShortDateString();
            this.lblEnddate.Text = (Convert.ToDateTime(model.Enddate)).ToShortDateString();
            this.Label_Address.Text = model.Address;
            this.Label_Number.Text = model.Number;


            DataSet ds2 = new DataSet();
            Maticsoft.BLL.W_Receivestate bll3 = new Maticsoft.BLL.W_Receivestate();
            ds2 = bll3.GetList("MaterialId=" + Id);
            for (int i = 0; i < ds2.Tables[0].Rows.Count; i++)
            {
                int j = int.Parse(ds2.Tables[0].Rows[i][2].ToString());
                Maticsoft.BLL.W_Receiver bll4 = new Maticsoft.BLL.W_Receiver();
                Maticsoft.Model.W_Receiver model4 = new Maticsoft.Model.W_Receiver();
                model4 = bll4.GetModel(j);
                this.lblReceiver.Text += model4.Receiver + "  ";

            }

            DataSet ds5 = new DataSet();
            Maticsoft.BLL.W_Receivestate bll5 = new Maticsoft.BLL.W_Receivestate();
            ds5 = bll5.GetList("MaterialId=" + Id + "and Dormacy = '提交'");
            for (int i = 0; i < ds5.Tables[0].Rows.Count; i++)
            {
                int j = int.Parse(ds5.Tables[0].Rows[i][2].ToString());
                Maticsoft.BLL.W_Receiver bll4 = new Maticsoft.BLL.W_Receiver();
                Maticsoft.Model.W_Receiver model4 = new Maticsoft.Model.W_Receiver();
                model4 = bll4.GetModel(j);
                this.Label_IsHanded.Text += model4.Receiver + "  ";

            }

        }
예제 #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string id = "";

            //CheckBoxList_Reciever初始化
            if (!IsPostBack)
            {
                try
                {
                    id = Request.QueryString[0].ToString();
                    this.Label1.Text = id;
                }
                catch { }

                if (id == "")
                {
                    this.begindate.Text = DateTime.Now.ToShortDateString();
                    this.enddate.Text   = DateTime.Now.AddDays(7).ToShortDateString();
                }

                else
                {
                    //绑定CheckBoxList前面的部分
                    Maticsoft.BLL.W_Material   bll2  = new Maticsoft.BLL.W_Material();
                    Maticsoft.Model.W_Material model = new Maticsoft.Model.W_Material();
                    model               = bll2.GetModel(int.Parse(id));
                    this.Name.Text      = model.Name;
                    this.begindate.Text = (Convert.ToDateTime(model.Begindate)).ToShortDateString();
                    this.enddate.Text   = (Convert.ToDateTime(model.Enddate)).ToShortDateString();
                    //绑定CheckBoxList
                    DataSet ds = new DataSet();
                    Maticsoft.BLL.W_Receiver bll = new Maticsoft.BLL.W_Receiver();
                    ds = bll.W_Receiver_Mid(id);
                    this.CheckBoxList_Reciever.DataSource = ds;
                    CheckBoxList_Reciever.DataTextField   = "Receiver";
                    CheckBoxList_Reciever.DataValueField  = "Id";
                    CheckBoxList_Reciever.DataBind();
                }
            }
        }
예제 #9
0
        protected void Bind(int Id)
        {
            Maticsoft.BLL.W_Material   bll   = new Maticsoft.BLL.W_Material();
            Maticsoft.Model.W_Material model = new Maticsoft.Model.W_Material();
            model                   = bll.GetModel(Id);
            this.lblId.Text         = model.Id.ToString();
            this.lblName.Text       = model.Name;
            this.lblBeginDate.Text  = (Convert.ToDateTime(model.Begindate)).ToShortDateString();
            this.lblEnddate.Text    = (Convert.ToDateTime(model.Enddate)).ToShortDateString();
            this.Label_Address.Text = model.Address;
            this.Label_Number.Text  = model.Number;


            DataSet ds2 = new DataSet();

            Maticsoft.BLL.W_Receivestate bll3 = new Maticsoft.BLL.W_Receivestate();
            ds2 = bll3.GetList("MaterialId=" + Id);
            for (int i = 0; i < ds2.Tables[0].Rows.Count; i++)
            {
                int j = int.Parse(ds2.Tables[0].Rows[i][2].ToString());
                Maticsoft.BLL.W_Receiver   bll4   = new Maticsoft.BLL.W_Receiver();
                Maticsoft.Model.W_Receiver model4 = new Maticsoft.Model.W_Receiver();
                model4 = bll4.GetModel(j);
                this.lblReceiver.Text += model4.Receiver + "  ";
            }

            DataSet ds5 = new DataSet();

            Maticsoft.BLL.W_Receivestate bll5 = new Maticsoft.BLL.W_Receivestate();
            ds5 = bll5.GetList("MaterialId=" + Id + "and Dormacy = '提交'");
            for (int i = 0; i < ds5.Tables[0].Rows.Count; i++)
            {
                int j = int.Parse(ds5.Tables[0].Rows[i][2].ToString());
                Maticsoft.BLL.W_Receiver   bll4   = new Maticsoft.BLL.W_Receiver();
                Maticsoft.Model.W_Receiver model4 = new Maticsoft.Model.W_Receiver();
                model4 = bll4.GetModel(j);
                this.Label_IsHanded.Text += model4.Receiver + "  ";
            }
        }
예제 #10
0
        protected void Page_Load(object sender, EventArgs e)
        {


            string id = "";
            //CheckBoxList_Reciever初始化
            if (!IsPostBack)
            {
                try
                {
                    id = Request.QueryString[0].ToString();
                    this.Label1.Text = id;
                }
                catch { }

                if (id == "")
                {
                    this.begindate.Text = DateTime.Now.ToShortDateString();
                    this.enddate.Text = DateTime.Now.AddDays(7).ToShortDateString();
                }

                else
                {
                    //绑定CheckBoxList前面的部分
                    Maticsoft.BLL.W_Material bll2 = new Maticsoft.BLL.W_Material();
                    Maticsoft.Model.W_Material model = new Maticsoft.Model.W_Material();
                    model = bll2.GetModel(int.Parse(id));
                    this.Name.Text = model.Name;
                    this.begindate.Text = (Convert.ToDateTime(model.Begindate)).ToShortDateString();
                    this.enddate.Text = (Convert.ToDateTime(model.Enddate)).ToShortDateString();
                    //绑定是否显示过期
                    if (model.Outdisplay == "是")
                        this.CheckBox1.Checked = true;
                    //绑定CheckBoxList
                    DataSet ds = new DataSet();
                    Maticsoft.BLL.W_Receiver bll = new Maticsoft.BLL.W_Receiver();
                    ds = bll.W_Receiver_Mid(id);
                    this.CheckBoxList_Reciever.DataSource = ds;
                    CheckBoxList_Reciever.DataTextField = "Receiver";
                    CheckBoxList_Reciever.DataValueField = "Id";
                    CheckBoxList_Reciever.DataBind();

                    //添加选定内容 陈湘军 
                    //修改存储过程 W_Receiver_Mid,添加dormacy字段

                    if (ds != null && ds.Tables[0].Rows.Count > 0)
                    {
                        for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                        {
                            try
                            {
                                CheckBoxList_Reciever.Items[i].Selected = (ds.Tables[0].Rows[i]["dormacy"].ToString() == "提交");
                            }
                            catch { }
                        }
                    }
                    
                }
            }
            
        }