Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         if (!string.IsNullOrEmpty(Request.Params["ProJectId"]))
         {
             Tunnel.Model.Tunnel_ProJectMent TPModel = new Tunnel.Model.Tunnel_ProJectMent();
             Tunnel.BLL.Tunnel_ProJectMent   TPBll   = new Tunnel.BLL.Tunnel_ProJectMent();
             TPModel     = TPBll.GetModel(int.Parse(Request.Params["ProJectId"]));
             Label1.Text = Page.Title = TPModel.Pro_Name;
             IsSubmit(Label2, TPModel.Pro_ManEndDate, HyperLink1, HyperLink7);
             IsSubmit(Label3, TPModel.Pro_ContractEndDate, HyperLink2, HyperLink8);
             IsSubmit(Label4, TPModel.Pro_EquipmentEndDate, HyperLink3, HyperLink9);
             IsSubmit(Label5, TPModel.Pro_MaterialEndDate, HyperLink4, HyperLink10);
             IsSubmit(Label6, TPModel.Pro_PlanEndDate, HyperLink5, HyperLink11);
             IsSubmit(Label7, TPModel.Pro_SecurityEndDate, HyperLink6, HyperLink12);
         }
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int  Add(Tunnel.Model.Tunnel_ProJectMent model)
 {
     return(dal.Add(model));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(Tunnel.Model.Tunnel_ProJectMent model)
 {
     dal.Update(model);
 }
Ejemplo n.º 4
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <Tunnel.Model.Tunnel_ProJectMent> DataTableToList(DataTable dt)
        {
            List <Tunnel.Model.Tunnel_ProJectMent> modelList = new List <Tunnel.Model.Tunnel_ProJectMent>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                Tunnel.Model.Tunnel_ProJectMent model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new Tunnel.Model.Tunnel_ProJectMent();
                    //model.Pro_Id=dt.Rows[n]["Pro_Id"].ToString();
                    model.Pro_Title = dt.Rows[n]["Pro_Title"].ToString();
                    model.Pro_Name  = dt.Rows[n]["Pro_Name"].ToString();
                    if (dt.Rows[n]["Pro_StartDate"].ToString() != "")
                    {
                        model.Pro_StartDate = DateTime.Parse(dt.Rows[n]["Pro_StartDate"].ToString());
                    }
                    if (dt.Rows[n]["Pro_EndDate"].ToString() != "")
                    {
                        model.Pro_EndDate = DateTime.Parse(dt.Rows[n]["Pro_EndDate"].ToString());
                    }
                    if (dt.Rows[n]["Pro_ManDate"].ToString() != "")
                    {
                        model.Pro_ManDate = DateTime.Parse(dt.Rows[n]["Pro_ManDate"].ToString());
                    }
                    if (dt.Rows[n]["Pro_ManEndDate"].ToString() != "")
                    {
                        model.Pro_ManEndDate = DateTime.Parse(dt.Rows[n]["Pro_ManEndDate"].ToString());
                    }
                    if (dt.Rows[n]["Pro_ContractDate"].ToString() != "")
                    {
                        model.Pro_ContractDate = DateTime.Parse(dt.Rows[n]["Pro_ContractDate"].ToString());
                    }
                    if (dt.Rows[n]["Pro_ContractEndDate"].ToString() != "")
                    {
                        model.Pro_ContractEndDate = DateTime.Parse(dt.Rows[n]["Pro_ContractEndDate"].ToString());
                    }
                    if (dt.Rows[n]["Pro_EquipmentDate"].ToString() != "")
                    {
                        model.Pro_EquipmentDate = DateTime.Parse(dt.Rows[n]["Pro_EquipmentDate"].ToString());
                    }
                    if (dt.Rows[n]["Pro_EquipmentEndDate"].ToString() != "")
                    {
                        model.Pro_EquipmentEndDate = DateTime.Parse(dt.Rows[n]["Pro_EquipmentEndDate"].ToString());
                    }
                    if (dt.Rows[n]["Pro_MaterialDate"].ToString() != "")
                    {
                        model.Pro_MaterialDate = DateTime.Parse(dt.Rows[n]["Pro_MaterialDate"].ToString());
                    }
                    if (dt.Rows[n]["Pro_MaterialEndDate"].ToString() != "")
                    {
                        model.Pro_MaterialEndDate = DateTime.Parse(dt.Rows[n]["Pro_MaterialEndDate"].ToString());
                    }
                    if (dt.Rows[n]["Pro_PlanDate"].ToString() != "")
                    {
                        model.Pro_PlanDate = DateTime.Parse(dt.Rows[n]["Pro_PlanDate"].ToString());
                    }
                    if (dt.Rows[n]["Pro_PlanEndDate"].ToString() != "")
                    {
                        model.Pro_PlanEndDate = DateTime.Parse(dt.Rows[n]["Pro_PlanEndDate"].ToString());
                    }
                    if (dt.Rows[n]["Pro_SecurityDate"].ToString() != "")
                    {
                        model.Pro_SecurityDate = DateTime.Parse(dt.Rows[n]["Pro_SecurityDate"].ToString());
                    }
                    if (dt.Rows[n]["Pro_SecurityEndDate"].ToString() != "")
                    {
                        model.Pro_SecurityEndDate = DateTime.Parse(dt.Rows[n]["Pro_SecurityEndDate"].ToString());
                    }
                    if (dt.Rows[n]["Pro_Status"].ToString() != "")
                    {
                        model.Pro_Status = int.Parse(dt.Rows[n]["Pro_Status"].ToString());
                    }
                    //model.Pro_Manager=dt.Rows[n]["Pro_Manager"].ToString();
                    modelList.Add(model);
                }
            }
            return(modelList);
        }