/// <summary> /// /// 编写日期:2010-4-11 /// 编写人:GWF /// </summary> /// <param name="APPLYGUID"></param> public Detail_CAW_BANK_APPLY GetDetail(string APPLYGUID) { Database db = DatabaseFactory.CreateDatabase(CawConnStr); string strSql = "SELECT A.*,B.DATASTATUS,B.DATASTATUS_NAME,B.CHECKOPION FROM CAW_BANK_APPLY A,CAW_DATESTATUS B WHERE A.APPLYGUID=B.KEYGUID AND A.APPLYGUID='" + APPLYGUID + "' "; DbCommand cmd = db.GetSqlStringCommand(strSql); Detail_CAW_BANK_APPLY myDetail = new Detail_CAW_BANK_APPLY(); using (IDataReader myReader = db.ExecuteReader(cmd)) { if (myReader.Read()) { if (!Convert.IsDBNull(myReader["APPLYGUID"])) { myDetail.APPLYGUID = Convert.ToString(myReader["APPLYGUID"]); } if (!Convert.IsDBNull(myReader["PROJECTNAME"])) { myDetail.PROJECTNAME = Convert.ToString(myReader["PROJECTNAME"]); } if (!Convert.IsDBNull(myReader["CORGUID"])) { myDetail.CORGUID = Convert.ToString(myReader["CORGUID"]); } if (!Convert.IsDBNull(myReader["LAWMAN"])) { myDetail.LAWMAN = Convert.ToString(myReader["LAWMAN"]); } if (!Convert.IsDBNull(myReader["CORNAME"])) { myDetail.CORNAME = Convert.ToString(myReader["CORNAME"]); } if (!Convert.IsDBNull(myReader["CORADDRESS"])) { myDetail.CORADDRESS = Convert.ToString(myReader["CORADDRESS"]); } if (!Convert.IsDBNull(myReader["LMPHONE"])) { myDetail.LMPHONE = Convert.ToString(myReader["LMPHONE"]); } if (!Convert.IsDBNull(myReader["LMCODE"])) { myDetail.LMCODE = Convert.ToString(myReader["LMCODE"]); } if (!Convert.IsDBNull(myReader["AGENT"])) { myDetail.AGENT = Convert.ToString(myReader["AGENT"]); } if (!Convert.IsDBNull(myReader["APHONE"])) { myDetail.APHONE = Convert.ToString(myReader["APHONE"]); } if (!Convert.IsDBNull(myReader["ACODE"])) { myDetail.ACODE = Convert.ToString(myReader["ACODE"]); } if (!Convert.IsDBNull(myReader["APPLYITEM"])) { myDetail.APPLYITEM = Convert.ToString(myReader["APPLYITEM"]); } if (!Convert.IsDBNull(myReader["WORKAREA"])) { myDetail.WORKAREA = Convert.ToString(myReader["WORKAREA"]); } if (!Convert.IsDBNull(myReader["LINELENGTH"])) { myDetail.LINELENGTH = Convert.ToDouble(myReader["LINELENGTH"]); } if (!Convert.IsDBNull(myReader["LINETYPE"])) { myDetail.LINETYPE = Convert.ToString(myReader["LINETYPE"]); } if (!Convert.IsDBNull(myReader["GISINFO"])) { myDetail.GISINFO = Convert.ToString(myReader["GISINFO"]); } if (!Convert.IsDBNull(myReader["QUAYFUNCTION"])) { myDetail.QUAYFUNCTION = Convert.ToString(myReader["QUAYFUNCTION"]); } if (!Convert.IsDBNull(myReader["GOODSTYPE"])) { myDetail.GOODSTYPE = Convert.ToString(myReader["GOODSTYPE"]); } if (!Convert.IsDBNull(myReader["PROJECTSCALE"])) { myDetail.PROJECTSCALE = Convert.ToString(myReader["PROJECTSCALE"]); } if (!Convert.IsDBNull(myReader["APPLYREASON"])) { myDetail.APPLYREASON = Convert.ToString(myReader["APPLYREASON"]); } if (!Convert.IsDBNull(myReader["NOTE"])) { myDetail.NOTE = Convert.ToString(myReader["NOTE"]); } if (!Convert.IsDBNull(myReader["APPLICANT"])) { myDetail.APPLICANT = Convert.ToString(myReader["APPLICANT"]); } if (!Convert.IsDBNull(myReader["APPLYDATE"])) { myDetail.APPLYDATE = Convert.ToDateTime(myReader["APPLYDATE"]); } 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; }
/// <summary> /// 获取已经通过审核的岸线项目名称和Guid,用于填充初步设计的下拉框 /// </summary> /// <param name="CORGUID"></param> /// <returns></returns> public List<Detail_CAW_BANK_APPLY> GetProject(string CORGUID) { Database db = DatabaseFactory.CreateDatabase(CawConnStr); string strSql = "SELECT PROJECTNAME,APPLYGUID FROM CAW_BANK_APPLY A,CAW_DATESTATUS B WHERE A.APPLYGUID=B.KEYGUID AND B.DATASTATUS='2' AND A.CORGUID='" + CORGUID + "'"; DbCommand cmd = db.GetSqlStringCommand(strSql); DataView dv = db.ExecuteDataView(cmd); List<Detail_CAW_BANK_APPLY> ProjectList = new List<Detail_CAW_BANK_APPLY>(); for (int i = 0; i < dv.Count; i++) { Detail_CAW_BANK_APPLY Project = new Detail_CAW_BANK_APPLY(); Project.PROJECTNAME = dv[i]["PROJECTNAME"].ToString(); Project.APPLYGUID = dv[i]["APPLYGUID"].ToString(); ProjectList.Add(Project); } return ProjectList; }