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); } } } }
public void AddTreeNode(TreeNode tn, DataRow dr, DataSet ds, DB_OPT dbo) { TreeNode child = new TreeNode(dr["Name"].ToString(), dr["PK"].ToString()) { SelectAction = TreeNodeSelectAction.Expand, ShowCheckBox = false }; tn.ChildNodes.Add(child); TreeNode node2 = new TreeNode("List", "") { SelectAction = TreeNodeSelectAction.Expand, ShowCheckBox = false }; TreeNode node3 = new TreeNode("Detail", "") { SelectAction = TreeNodeSelectAction.Expand, ShowCheckBox = false }; child.ChildNodes.Add(node2); child.ChildNodes.Add(node3); ServicesMessModel model = new ServicesMessDal(); string strWhere = ""; if (((UserModel)base.Session["User"]).UserName == "admin") { strWhere = "OperationPK='" + dr["PK"].ToString() + "' and ISSAVE=1 "; } else { strWhere = "OperationPK='" + dr["PK"].ToString() + "' and CompanyPK='" + ((UserModel)base.Session["User"]).pk_corp + "' and ISSAVE=1 "; } foreach (DataRow row in model.GetList(strWhere, dbo).Tables[0].Rows) { if (row["name"].ToString().IndexOf("list") >= 0) { this.AddTreeNode_SM(node2, row); } else { this.AddTreeNode_SM(node3, row); } } }
public static ArrayList GetServices(string strs, DB_OPT dbo) { ArrayList arr = new ArrayList(); string[] strArray = strs.Split(new char[] { '|' }); ServicesMessModel sm = null; for (int i = 0; i < strArray.Length; i++) { sm = new ServicesMessDal { PK = strArray[i] }; sm = sm.GetModel(dbo); string bLPassType = sm.BLPassType; string[,] strArray2 = null; string isBLService = sm.IsBLService; if (isBLService != null) { if (!(isBLService == "0")) { if (!(isBLService == "1")) { continue; } goto Label_00B1; } strArray2 = new string[,] { { (i + 1).ToString(), strArray[i] } }; arr.Add(strArray2); } continue; Label_00B1:; string[] strArray3 = sm.BLPKs.Split(new char[] { '~' }); for (int j = 0; j < strArray3.Length; j++) { string[] strArray4 = strArray3[j].Split(new char[] { '^' }); for (int k = 0; k < strArray4.Length; k++) { GetServices(ref arr, strArray, i, strArray4, k, j, strArray3.Length, strArray2, sm, bLPassType, bLPassType, dbo); } } } return arr; }
public bool checkServiceMess(string strWhere) { ServicesMessModel model = new ServicesMessDal(); this.dbo = new DB_OPT(); return (model.GetList(strWhere, this.dbo).Tables[0].Rows.Count > 0); }
public ServicesMessModel GetModelOnly(string pk, DB_OPT dbo) { StringBuilder builder = new StringBuilder(); builder.Append(this.GetSql()); builder.Append(" where PK=:PK"); OracleParameter[] parameters = new OracleParameter[] { new OracleParameter(":PK", OracleType.Char) }; parameters[0].Value = pk; DataSet set = dbo.BackDataSet(builder.ToString(), parameters, ""); if (set.Tables[0].Rows.Count > 0) { ServicesMessDal dal = new ServicesMessDal(); return dal.GetModel(set.Tables[0].Rows[0], dbo); } return null; }