Пример #1
0
        /// <summary>
        /// 
        /// 编写日期:2010-3-30
        /// 编写人:GWF
        /// </summary>
        /// <param name="GUID"></param>
        public Detail_CAW_BANK_FILEACCEPTANCE GetDetail(string GUID)
        {
            Database db = DatabaseFactory.CreateDatabase(CawConnStr);
            string strSql = "SELECT A.*,B.DATASTATUS,B.DATASTATUS_NAME,B.CHECKOPION FROM CAW_BANK_FILEACCEPTANCE A,CAW_DATESTATUS B WHERE A.GUID=B.KEYGUID AND A.GUID='" + GUID + "' ";
            DbCommand cmd = db.GetSqlStringCommand(strSql);

            Detail_CAW_BANK_FILEACCEPTANCE myDetail = new Detail_CAW_BANK_FILEACCEPTANCE();

            using (IDataReader myReader = db.ExecuteReader(cmd))
            {
                if (myReader.Read())
                {
                    if (!Convert.IsDBNull(myReader["GUID"]))
                    {
                        myDetail.GUID = Convert.ToString(myReader["GUID"]);
                    }
                    if (!Convert.IsDBNull(myReader["PROJECTNAME"]))
                    {
                        myDetail.PROJECTNAME = Convert.ToString(myReader["PROJECTNAME"]);
                    }
                    if (!Convert.IsDBNull(myReader["STARTWORKGUID"]))
                    {
                        myDetail.STARTWORKGUID = Convert.ToString(myReader["STARTWORKGUID"]);
                    }
                    if (!Convert.IsDBNull(myReader["SETITEMORG"]))
                    {
                        myDetail.SETITEMORG = Convert.ToString(myReader["SETITEMORG"]);
                    }
                    if (!Convert.IsDBNull(myReader["DESIGNDEPART"]))
                    {
                        myDetail.DESIGNDEPART = Convert.ToString(myReader["DESIGNDEPART"]);
                    }
                    if (!Convert.IsDBNull(myReader["INVESTTOTAL"]))
                    {
                        myDetail.INVESTTOTAL = Convert.ToString(myReader["INVESTTOTAL"]);
                    }
                    if (!Convert.IsDBNull(myReader["BUILDDATE"]))
                    {
                        myDetail.BUILDDATE = Convert.ToDateTime(myReader["BUILDDATE"]);
                    }
                    if (!Convert.IsDBNull(myReader["SUPUNIT"]))
                    {
                        myDetail.SUPUNIT = Convert.ToString(myReader["SUPUNIT"]);
                    }
                    if (!Convert.IsDBNull(myReader["BUILDERUNIT"]))
                    {
                        myDetail.BUILDERUNIT = Convert.ToString(myReader["BUILDERUNIT"]);
                    }
                    if (!Convert.IsDBNull(myReader["DESIGNERUNIT"]))
                    {
                        myDetail.DESIGNERUNIT = Convert.ToString(myReader["DESIGNERUNIT"]);
                    }
                    if (!Convert.IsDBNull(myReader["CORGUID"]))
                    {
                        myDetail.CORGUID = Convert.ToString(myReader["CORGUID"]);
                    }
                    if (!Convert.IsDBNull(myReader["CORNAME"]))
                    {
                        myDetail.CORNAME = Convert.ToString(myReader["CORNAME"]);
                    }
                    if (!Convert.IsDBNull(myReader["CONTACTOR"]))
                    {
                        myDetail.CONTACTOR = Convert.ToString(myReader["CONTACTOR"]);
                    }
                    if (!Convert.IsDBNull(myReader["CONTACTORTEL"]))
                    {
                        myDetail.CONTACTORTEL = Convert.ToString(myReader["CONTACTORTEL"]);
                    }
                    if (!Convert.IsDBNull(myReader["CORADDRESS"]))
                    {
                        myDetail.CORADDRESS = Convert.ToString(myReader["CORADDRESS"]);
                    }
                    if (!Convert.IsDBNull(myReader["EMAIL"]))
                    {
                        myDetail.EMAIL = Convert.ToString(myReader["EMAIL"]);
                    }
                    if (!Convert.IsDBNull(myReader["FILEDATE"]))
                    {
                        myDetail.FILEDATE = Convert.ToDateTime(myReader["FILEDATE"]);
                    }
                    if (!Convert.IsDBNull(myReader["FINISHDATE"]))
                    {
                        myDetail.FINISHDATE = Convert.ToDateTime(myReader["FINISHDATE"]);
                    }
                    if (!Convert.IsDBNull(myReader["CORSELFOPION"]))
                    {
                        myDetail.CORSELFOPION = Convert.ToString(myReader["CORSELFOPION"]);
                    }
                    if (!Convert.IsDBNull(myReader["APPLYDATE"]))
                    {
                        myDetail.APPLYDATE = Convert.ToDateTime(myReader["APPLYDATE"]);
                    }
                    if (!Convert.IsDBNull(myReader["CHECKORGOPION"]))
                    {
                        myDetail.CHECKOPION = Convert.ToString(myReader["CHECKORGOPION"]);
                    }
                    if (!Convert.IsDBNull(myReader["DATASTATUS"]))
                    {
                        myDetail.DATASTATUS = Convert.ToString(myReader["DATASTATUS"]);
                    }
                    if (!Convert.IsDBNull(myReader["DATASTATUS_NAME"]))
                    {
                        myDetail.DATASTATUS_NAME = Convert.ToString(myReader["DATASTATUS_NAME"]);
                    }
                    if (!Convert.IsDBNull(myReader["CHECKOPION"]))
                    {
                        myDetail.CHECKOPION = Convert.ToString(myReader["CHECKOPION"]);
                    }
                }
            }
            return myDetail;
        }
Пример #2
0
 /// <summary>
 ///从通过档案验收中,获取项目名称列表
 /// </summary>
 /// <param name="CORGUID"></param>
 /// <returns></returns>
 public List<Detail_CAW_BANK_FILEACCEPTANCE> GetProject(string CORGUID)
 {
     Database db = DatabaseFactory.CreateDatabase(CawConnStr);
     string strSql = "SELECT A.PROJECTNAME,A.GUID FROM CAW_BANK_FILEACCEPTANCE A,CAW_DATESTATUS B WHERE  A.GUID=B.KEYGUID AND B.DATASTATUS='2' AND A.CORGUID='" + CORGUID + "'";
     DbCommand cmd = db.GetSqlStringCommand(strSql);
     DataView dv = db.ExecuteDataView(cmd);
     List<Detail_CAW_BANK_FILEACCEPTANCE> ProjectList = new List<Detail_CAW_BANK_FILEACCEPTANCE>();
     for (int i = 0; i < dv.Count; i++)
     {
         Detail_CAW_BANK_FILEACCEPTANCE Project = new Detail_CAW_BANK_FILEACCEPTANCE();
         Project.PROJECTNAME = dv[i]["PROJECTNAME"].ToString();
         Project.GUID = dv[i]["GUID"].ToString();
         ProjectList.Add(Project);
     }
     return ProjectList;
 }