Пример #1
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            DigiPower.Onlinecol.Standard.Model.T_FileList_MDL model = null;
            if (pageIndex != 1)
            {
                model = fileBLL.GetModel(Common.ConvertEx.ToInt(fileListID));
            }
            else
            {
                model = fileBLL.GetModel(Common.ConvertEx.ToInt(ID));
            }

            model = (Model.T_FileList_MDL)Comm.GetValueToObject(model, tbl);
            if (model != null && !model.IsFolder)
            {
                if (ConvertEx.ToInt(model.ManualCount) > 0)
                {
                    if (model.wjgbdm == "ct" ||
                        model.wjgbdm == "yt" ||
                        model.wjgbdm == "dt" ||
                        model.wjgbdm == "lt")
                    {
                        model.tzz = ConvertEx.ToInt(model.ManualCount);
                    }
                    else
                    {
                        model.sl = ConvertEx.ToInt(model.ManualCount);
                    }
                }
                model.qssj       = DateTime.Now;
                model.zzsj       = DateTime.Now;
                model.lrsj       = DateTime.Now;
                model.shsj_1     = DateTime.Now;
                model.shsj_2     = DateTime.Now;
                model.shsj_3     = DateTime.Now;
                model.aipdate    = DateTime.Now;
                model.pssj       = DateTime.Now;
                model.CreateDate = DateTime.Now;
                model.Version    = PublicModel.getFileVersion(model.SingleProjectID.ToString()); //获取文件的版本号
                fileBLL.Update(model);

                PublicModel.writeLog(SystemSet.EumLogType.UpdData.ToString(), string.Concat("T_FileList;key=", model.FileListID,
                                                                                            ";SingleProjectID=", model.SingleProjectID, ";bh=", model.BH, ";Title=", model.Title));

                T_Other_BLL otherBLL = new T_Other_BLL();
                otherBLL.UpdateArchiveStatus(model.FileListID.ToString(), 10, "0");
            }
            Common.MessageBox.CloseLayerOpenWeb(this.Page);
        }
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            BLL.T_FileList_BLL   bll   = new DigiPower.Onlinecol.Standard.BLL.T_FileList_BLL();
            Model.T_FileList_MDL model = new DigiPower.Onlinecol.Standard.Model.T_FileList_MDL();
            string Action = Request.QueryString["Action"].ToString();

            if (Action == "Modify")
            {
                string FileListID = Request.QueryString["FileListID"].ToString();
                model = bll.GetModel(Common.ConvertEx.ToInt(FileListID));
                model = (Model.T_FileList_MDL)Comm.GetValueToObject(model, this.tbl);

                Model.T_FileList_MDL parentModel = bll.GetModel(Common.ConvertEx.ToInt(tempPID.SelectValue));
                model.PID = parentModel.recID;//换了父类的话

                bll.Update(model);
            }
            else
            {
                //取父类的的呢东西,
                //model = bll.GetModel("recID=" + Common.ConvertEx.ToInt(PID.SelectValue) + " AND SingleProjectID=" + SingleProjectID.Value);
                Model.T_FileList_MDL parentModel = bll.GetModel(Common.ConvertEx.ToInt(tempPID.SelectValue));

                model = parentModel;
                model = (Model.T_FileList_MDL)Comm.GetValueToObject(model, this.tbl);

                model.SingleProjectID    = parentModel.SingleProjectID;
                model.DefaultCompanyType = parentModel.DefaultCompanyType;
                model.PID = parentModel.recID;

                model.recID      = bll.GetMaxRecID(SingleProjectID.Value.ToString());
                model.FileListID = 0;     //新增的,不可以真用老的
                model.IsFolder   = false;
                model.IsSystem   = false; //这是自定议的,可以删除
                bll.Add(model);
            }
            Response.Redirect("Wjdj.aspx?SingleProjectID=" + SingleProjectID.Value + "&WorkFlowID=" + WorkFlowID.Value + "&PageIndex=" + pPageIndex);
        }
Пример #3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int Add(DigiPower.Onlinecol.Standard.Model.T_FileList_MDL model)
 {
     return(dal.Add(model));
 }
Пример #4
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(DigiPower.Onlinecol.Standard.Model.T_FileList_MDL model)
 {
     dal.Update(model);
 }
Пример #5
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <DigiPower.Onlinecol.Standard.Model.T_FileList_MDL> DataTableToList(DataTable dt)
        {
            List <DigiPower.Onlinecol.Standard.Model.T_FileList_MDL> modelList = new List <DigiPower.Onlinecol.Standard.Model.T_FileList_MDL>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                DigiPower.Onlinecol.Standard.Model.T_FileList_MDL model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new DigiPower.Onlinecol.Standard.Model.T_FileList_MDL();
                    if (dt.Rows[n]["FileListID"].ToString() != "")
                    {
                        model.FileListID = int.Parse(dt.Rows[n]["FileListID"].ToString());
                    }
                    if (dt.Rows[n]["SingleProjectID"].ToString() != "")
                    {
                        model.SingleProjectID = int.Parse(dt.Rows[n]["SingleProjectID"].ToString());
                    }
                    if (dt.Rows[n]["ArchiveID"].ToString() != "")
                    {
                        model.ArchiveID = int.Parse(dt.Rows[n]["ArchiveID"].ToString());
                    }
                    if (dt.Rows[n]["MyArchiveID"].ToString() != "")
                    {
                        model.MyArchiveID = int.Parse(dt.Rows[n]["MyArchiveID"].ToString());
                    }
                    if (dt.Rows[n]["recID"].ToString() != "")
                    {
                        model.recID = int.Parse(dt.Rows[n]["recID"].ToString());
                    }
                    if (dt.Rows[n]["PID"].ToString() != "")
                    {
                        model.PID = int.Parse(dt.Rows[n]["PID"].ToString());
                    }
                    if (dt.Rows[n]["DefaultCompanyType"].ToString() != "")
                    {
                        model.DefaultCompanyType = int.Parse(dt.Rows[n]["DefaultCompanyType"].ToString());
                    }
                    model.DH     = dt.Rows[n]["DH"].ToString();
                    model.MyCode = dt.Rows[n]["MyCode"].ToString();
                    model.BH     = dt.Rows[n]["BH"].ToString();
                    model.Title  = dt.Rows[n]["Title"].ToString();
                    if (dt.Rows[n]["MustSubmitFlag"].ToString() != "")
                    {
                        if ((dt.Rows[n]["MustSubmitFlag"].ToString() == "1") || (dt.Rows[n]["MustSubmitFlag"].ToString().ToLower() == "true"))
                        {
                            model.MustSubmitFlag = true;
                        }
                        else
                        {
                            model.MustSubmitFlag = false;
                        }
                    }
                    model.OldStatus = dt.Rows[n]["OldStatus"].ToString();
                    model.Status    = dt.Rows[n]["Status"].ToString();
                    model.StartTime = dt.Rows[n]["StartTime"].ToString();
                    model.EndTime   = dt.Rows[n]["EndTime"].ToString();
                    if (dt.Rows[n]["CompanyID"].ToString() != "")
                    {
                        model.CompanyID = int.Parse(dt.Rows[n]["CompanyID"].ToString());
                    }
                    if (dt.Rows[n]["OperateUserID"].ToString() != "")
                    {
                        model.OperateUserID = int.Parse(dt.Rows[n]["OperateUserID"].ToString());
                    }
                    model.OperateUserName = dt.Rows[n]["OperateUserName"].ToString();
                    if (dt.Rows[n]["OrderIndex"].ToString() != "")
                    {
                        model.OrderIndex = int.Parse(dt.Rows[n]["OrderIndex"].ToString());
                    }
                    if (dt.Rows[n]["ManualCount"].ToString() != "")
                    {
                        model.ManualCount = int.Parse(dt.Rows[n]["ManualCount"].ToString());
                    }
                    if (dt.Rows[n]["PagesCount"].ToString() != "")
                    {
                        model.PagesCount = int.Parse(dt.Rows[n]["PagesCount"].ToString());
                    }
                    if (dt.Rows[n]["WinRecvPagesCount"].ToString() != "")
                    {
                        model.WinRecvPagesCount = int.Parse(dt.Rows[n]["WinRecvPagesCount"].ToString());
                    }
                    model.Remark      = dt.Rows[n]["Remark"].ToString();
                    model.PDFFilePath = dt.Rows[n]["PDFFilePath"].ToString();
                    if (dt.Rows[n]["AlonePack"].ToString() != "")
                    {
                        if ((dt.Rows[n]["AlonePack"].ToString() == "1") || (dt.Rows[n]["AlonePack"].ToString().ToLower() == "true"))
                        {
                            model.AlonePack = true;
                        }
                        else
                        {
                            model.AlonePack = false;
                        }
                    }
                    if (dt.Rows[n]["IsFolder"].ToString() != "")
                    {
                        if ((dt.Rows[n]["IsFolder"].ToString() == "1") || (dt.Rows[n]["IsFolder"].ToString().ToLower() == "true"))
                        {
                            model.IsFolder = true;
                        }
                        else
                        {
                            model.IsFolder = false;
                        }
                    }
                    if (dt.Rows[n]["IsSystem"].ToString() != "")
                    {
                        if ((dt.Rows[n]["IsSystem"].ToString() == "1") || (dt.Rows[n]["IsSystem"].ToString().ToLower() == "true"))
                        {
                            model.IsSystem = true;
                        }
                        else
                        {
                            model.IsSystem = false;
                        }
                    }
                    model.FileType        = dt.Rows[n]["FileType"].ToString();
                    model.archive_form_no = dt.Rows[n]["archive_form_no"].ToString();
                    model.zajh            = dt.Rows[n]["zajh"].ToString();
                    model.w_t_h           = dt.Rows[n]["w_t_h"].ToString();
                    model.wjtm            = dt.Rows[n]["wjtm"].ToString();
                    model.zrr             = dt.Rows[n]["zrr"].ToString();
                    if (dt.Rows[n]["qssj"].ToString() != "")
                    {
                        model.qssj = DateTime.Parse(dt.Rows[n]["qssj"].ToString());
                    }
                    if (dt.Rows[n]["zzsj"].ToString() != "")
                    {
                        model.zzsj = DateTime.Parse(dt.Rows[n]["zzsj"].ToString());
                    }
                    model.yc = dt.Rows[n]["yc"].ToString();
                    model.wb = dt.Rows[n]["wb"].ToString();
                    if (dt.Rows[n]["sl"].ToString() != "")
                    {
                        model.sl = int.Parse(dt.Rows[n]["sl"].ToString());
                    }
                    model.bgqx = dt.Rows[n]["bgqx"].ToString();
                    model.mj   = dt.Rows[n]["mj"].ToString();
                    model.dz_k = dt.Rows[n]["dz_k"].ToString();
                    model.dz_l = dt.Rows[n]["dz_l"].ToString();
                    model.dz_g = dt.Rows[n]["dz_g"].ToString();
                    model.dz_c = dt.Rows[n]["dz_c"].ToString();
                    model.dz_x = dt.Rows[n]["dz_x"].ToString();
                    model.ztlx = dt.Rows[n]["ztlx"].ToString();
                    model.dw   = dt.Rows[n]["dw"].ToString();
                    model.gg   = dt.Rows[n]["gg"].ToString();
                    model.ty   = dt.Rows[n]["ty"].ToString();
                    model.ztc  = dt.Rows[n]["ztc"].ToString();
                    model.note = dt.Rows[n]["note"].ToString();
                    model.sw   = dt.Rows[n]["sw"].ToString();
                    model.dz   = dt.Rows[n]["dz"].ToString();
                    model.lrr  = dt.Rows[n]["lrr"].ToString();
                    if (dt.Rows[n]["lrsj"].ToString() != "")
                    {
                        model.lrsj = DateTime.Parse(dt.Rows[n]["lrsj"].ToString());
                    }
                    if (dt.Rows[n]["shzt"].ToString() != "")
                    {
                        model.shzt = int.Parse(dt.Rows[n]["shzt"].ToString());
                    }
                    model.shr_1 = dt.Rows[n]["shr_1"].ToString();
                    if (dt.Rows[n]["shsj_1"].ToString() != "")
                    {
                        model.shsj_1 = DateTime.Parse(dt.Rows[n]["shsj_1"].ToString());
                    }
                    model.shr_2 = dt.Rows[n]["shr_2"].ToString();
                    if (dt.Rows[n]["shsj_2"].ToString() != "")
                    {
                        model.shsj_2 = DateTime.Parse(dt.Rows[n]["shsj_2"].ToString());
                    }
                    model.shr_3 = dt.Rows[n]["shr_3"].ToString();
                    if (dt.Rows[n]["shsj_3"].ToString() != "")
                    {
                        model.shsj_3 = DateTime.Parse(dt.Rows[n]["shsj_3"].ToString());
                    }
                    if (dt.Rows[n]["aipdate"].ToString() != "")
                    {
                        model.aipdate = DateTime.Parse(dt.Rows[n]["aipdate"].ToString());
                    }
                    model.aipuser = dt.Rows[n]["aipuser"].ToString();
                    model.ShortDH = dt.Rows[n]["ShortDH"].ToString();
                    model.swgph   = dt.Rows[n]["swgph"].ToString();
                    model.cfdz    = dt.Rows[n]["cfdz"].ToString();
                    model.wjbt    = dt.Rows[n]["wjbt"].ToString();
                    model.zrz     = dt.Rows[n]["zrz"].ToString();
                    model.wh      = dt.Rows[n]["wh"].ToString();
                    model.wjfwqx  = dt.Rows[n]["wjfwqx"].ToString();
                    model.xcsj    = dt.Rows[n]["xcsj"].ToString();
                    model.dzwjxx  = dt.Rows[n]["dzwjxx"].ToString();
                    model.fz      = dt.Rows[n]["fz"].ToString();
                    if (dt.Rows[n]["CreateDate"].ToString() != "")
                    {
                        model.CreateDate = DateTime.Parse(dt.Rows[n]["CreateDate"].ToString());
                    }
                    if (dt.Rows[n]["CreateDate2"].ToString() != "")
                    {
                        model.CreateDate2 = DateTime.Parse(dt.Rows[n]["CreateDate2"].ToString());
                    }
                    if (dt.Rows[n]["tzz"].ToString() != "")
                    {
                        model.tzz = int.Parse(dt.Rows[n]["tzz"].ToString());
                    }
                    if (dt.Rows[n]["dtz"].ToString() != "")
                    {
                        model.dtz = int.Parse(dt.Rows[n]["dtz"].ToString());
                    }
                    if (dt.Rows[n]["zpz"].ToString() != "")
                    {
                        model.zpz = int.Parse(dt.Rows[n]["zpz"].ToString());
                    }
                    if (dt.Rows[n]["wzz"].ToString() != "")
                    {
                        model.wzz = int.Parse(dt.Rows[n]["wzz"].ToString());
                    }
                    if (dt.Rows[n]["dpz"].ToString() != "")
                    {
                        model.dpz = int.Parse(dt.Rows[n]["dpz"].ToString());
                    }
                    model.wjgbdm = dt.Rows[n]["wjgbdm"].ToString();
                    model.wjlxdm = dt.Rows[n]["wjlxdm"].ToString();
                    model.wjgs   = dt.Rows[n]["wjgs"].ToString();
                    model.wjdx   = dt.Rows[n]["wjdx"].ToString();
                    model.psdd   = dt.Rows[n]["psdd"].ToString();
                    model.psz    = dt.Rows[n]["psz"].ToString();
                    if (dt.Rows[n]["pssj"].ToString() != "")
                    {
                        model.pssj = DateTime.Parse(dt.Rows[n]["pssj"].ToString());
                    }
                    model.sb   = dt.Rows[n]["sb"].ToString();
                    model.fbl  = dt.Rows[n]["fbl"].ToString();
                    model.xjpp = dt.Rows[n]["xjpp"].ToString();
                    model.xjxh = dt.Rows[n]["xjxh"].ToString();
                    model.bz   = dt.Rows[n]["bz"].ToString();


                    model.FROM_SID       = Common.ConvertEx.ToString(dt.Rows[n]["FROM_SID"]);
                    model.RootPath       = Common.ConvertEx.ToString(dt.Rows[n]["RootPath"]);
                    model.CONVERT_FLAG   = Common.ConvertEx.ToBool(dt.Rows[n]["CONVERT_FLAG"]);
                    model.CONVERT_DT     = Common.ConvertEx.ToString(dt.Rows[n]["CONVERT_DT"]);
                    model.SIGNATURE_FLAG = Common.ConvertEx.ToBool(dt.Rows[n]["SIGNATURE_FLAG"]);
                    model.SIGNATURE_DT   = Common.ConvertEx.ToString(dt.Rows[n]["SIGNATURE_DT"]);

                    if (dt.Rows[n]["OldRecID"].ToString() != "")
                    {
                        model.OldRecID = int.Parse(dt.Rows[n]["OldRecID"].ToString());
                    }
                    if (dt.Rows[n]["MyOrderIndex"].ToString() != "")
                    {
                        model.MyOrderIndex = int.Parse(dt.Rows[n]["MyOrderIndex"].ToString());
                    }
                    model.FileFrom = Common.ConvertEx.ToString(dt.Rows[n]["FileFrom"]);
                    model.IsMerge  = Common.ConvertEx.ToString(dt.Rows[n]["IsMerge"]);
                    if (dt.Rows[n]["Version"].ToString() != "")
                    {
                        model.Version = int.Parse(dt.Rows[n]["Version"].ToString());
                    }
                    model.iSignaturePdf      = Common.ConvertEx.ToBool(dt.Rows[n]["iSignaturePdf"]);
                    model.iSignatureWorkFlow = Common.ConvertEx.ToBool(dt.Rows[n]["iSignatureWorkFlow"]);

                    modelList.Add(model);
                }
            }
            return(modelList);
        }