コード例 #1
0
ファイル: ZSZXFJDal.cs プロジェクト: SoMeTech/SoMeRegulatory
 private ZSZXFJModel Getmm(DataRow dr, DB_OPT dbo)
 {
     ZSZXFJModel model = new ZSZXFJModel {
         pk = dr["pk"].ToString(),
         Discription = dr["Discription"].ToString(),
         ExecuteValue1 = decimal.Parse(dr["ExecuteValue1"].ToString()),
         ExecuteValue2 = decimal.Parse(dr["ExecuteValue2"].ToString()),
         ExecuteValue3 = decimal.Parse(dr["ExecuteValue3"].ToString()),
         OperationPK = dr["OperationPK"].ToString()
     };
     if (model.OperationPK.Trim() != "")
     {
         string strSql = "select Name FROM GOV_TC_DB_OPRATETACHE where PK='" + model.OperationPK.Trim() + "'";
         model.OperationName = dbo.SelectString(strSql, null);
     }
     model.SFPK = dr["SFPK"].ToString();
     SFTypeModel model2 = new SFTypeDal {
         PK = dr["SFPK"].ToString().Trim()
     };
     model2 = model2.GetModel(dbo);
     model.Sfinfo = model2;
     model.ProjectType = dr["ProjectType"].ToString();
     UsualBookTableModel model3 = new UsualBookTableDal {
         PK = dr["ProjectType"].ToString().Trim()
     };
     model3 = model3.GetModel(false, dbo);
     model.ProjecttypeInfo = model3;
     model.TermName1 = dr["TermName1"].ToString();
     model.TermName2 = dr["TermName2"].ToString();
     model.flog = int.Parse(dr["flog"].ToString());
     return model;
 }
コード例 #2
0
 public ServicesMessModel GetModel(DataRow dr, DB_OPT dbo)
 {
     ServicesMessModel model = new ServicesMessModel {
         PK = dr["PK"].ToString().Trim(),
         BH = dr["BH"].ToString().Trim(),
         ServiceTypePK = dr["ServiceTypePK"].ToString().Trim(),
         ServiceRegisterPK = dr["ServiceRegisterPK"].ToString().Trim()
     };
     if (model.ServiceRegisterPK.Trim() != "")
     {
         model.ServiceRegisterInfo = new ServicesRegisterDal { PK = model.ServiceRegisterPK.Trim() }.GetModel(false, false, dbo);
     }
     model.OperationPK = dr["OperationPK"].ToString().Trim();
     if (model.OperationPK.Trim() != "")
     {
         model.OperationInfo = new BusinessMessDal { PK = model.OperationPK.Trim() }.GetModel(dbo);
     }
     model.InPK = dr["InPK"].ToString().Trim();
     model.InPKJZJZ = dr["InPKJZJZ"].ToString().Trim();
     if (model.InPKJZJZ.Trim() != "")
     {
         model.InInfoJZJZ = new ServicesMessDal { PK = model.InPKJZJZ.Trim() }.GetModel(dbo);
     }
     model.CompanyPK = dr["CompanyPK"].ToString().Trim();
     if (model.CompanyPK.Trim() != "")
     {
         model.CompanyInfo = new CompanyDal { pk_corp = model.CompanyPK.Trim() }.GetModel(false, false, false, dbo);
     }
     model.BranchPK = dr["BranchPK"].ToString().Trim();
     if (model.BranchPK.Trim() != "")
     {
         model.BranchInfo = new BranchDal { BH = model.BranchPK.Trim() }.GetModel_BH(dbo);
     }
     model.TaxFeeCallectionPK = dr["TaxFeeCallectionPK"].ToString().Trim();
     if (model.TaxFeeCallectionPK.Trim() != "")
     {
         string strSql = "select Name FROM GOV_TC_DB_SFProject where PK='" + model.TaxFeeCallectionPK.Trim() + "'";
         model.TaxFeeCallectionName = dbo.SelectString(strSql, null);
     }
     model.PowerCode = dr["PowerCode"].ToString();
     model.Name = dr["Name"].ToString();
     model.Discription = dr["Discription"].ToString();
     model.IsShow = dr["IsShow"].ToString();
     model.IsBLService = dr["IsBLService"].ToString();
     model.BLPKs = dr["BLPKs"].ToString();
     model.BLPassType = dr["BLPassType"].ToString();
     return model;
 }
コード例 #3
0
ファイル: DB_Sql.cs プロジェクト: SoMeTech/SoMeRegulatory
 public static string GetSqlPK(DB_OPT dbo)
 {
     string strSql = "select newid()";
     return dbo.SelectString(strSql, null);
 }
コード例 #4
0
ファイル: DB_Oracle.cs プロジェクト: SoMeTech/SoMeRegulatory
 public static string GetOraclePK(DB_OPT dbo)
 {
     string strSql = "select sys_guid() from dual";
     return dbo.SelectString(strSql, null);
 }