コード例 #1
0
 public static void GetServices(ref ArrayList arr, string[] strs1, int i, string[] strs3, int t, int j, int zxcount, string[,] sers, ServicesMessModel sm, string bltype, string zxbltype, DB_OPT dbo)
 {
     sm = new ServicesMessDal();
     sm.PK = strs3[t];
     sm = sm.GetModel(dbo);
     string isBLService = sm.IsBLService;
     if (isBLService != null)
     {
         if (!(isBLService == "0"))
         {
             if (!(isBLService == "1"))
             {
                 return;
             }
         }
         else
         {
             sers = new string[1, 2];
             sers[0, 0] = (i + 1).ToString();
             if (zxcount > 1)
             {
                 string[] strArray = new string[] { bltype, ",", strs3[t], ",", (t + 1).ToString(), ",", (j + 1).ToString(), ",", zxbltype };
                 sers[0, 1] = string.Concat(strArray);
             }
             else
             {
                 string[] strArray2 = new string[] { bltype, ",", strs3[t], ",", (t + 1).ToString(), ",," };
                 sers[0, 1] = string.Concat(strArray2);
             }
             arr.Add(sers);
             return;
         }
         string[] strArray3 = sm.BLPKs.Split(new char[] { '~' });
         for (int k = 0; k < strArray3.Length; k++)
         {
             string[] strArray4 = strArray3[k].Split(new char[] { '^' });
             for (int m = 0; m < strArray4.Length; m++)
             {
                 GetServices(ref arr, strs1, i, strArray4, m, j, zxcount, sers, sm, sm.BLPassType, zxbltype, dbo);
             }
         }
     }
 }
コード例 #2
0
 public override ServicesMessModel[] GetModel(string strWhere, DB_OPT dbo)
 {
     StringBuilder builder = new StringBuilder();
     builder.Append(this.GetSql());
     if (strWhere != "")
     {
         builder.Append(" where " + strWhere);
     }
     builder.Append(" order by BH ");
     DataSet set = dbo.BackDataSet(builder.ToString(), null);
     ServicesMessModel[] modelArray = null;
     if (set.Tables[0].Rows.Count <= 0)
     {
         return null;
     }
     modelArray = new ServicesMessModel[set.Tables[0].Rows.Count];
     for (int i = 0; i < set.Tables[0].Rows.Count; i++)
     {
         modelArray[i] = new ServicesMessModel();
         modelArray[i] = this.GetModel(set.Tables[0].Rows[i], dbo);
     }
     return modelArray;
 }
コード例 #3
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;
 }