Esempio n. 1
0
        public static UcmlViewCompnent GetVC(SqlConnection conn, string vcOid)
        {
            UcmlViewCompnent vc = new UcmlViewCompnent();

            vc.OID = vcOid;
            StringBuilder sql = new StringBuilder("select ");

            sql.Append("a.AppletName,a.Caption,a.fTreeGridMode,a.fSubTableTreeMode,a.ImageLink,a.SubBCs,a.SubParentFields,a.SubPicFields,");
            sql.Append("a.SubLabelFields,a.SubFKFields,a.TargetHTMLSource ,a.AllowEdit,a.UserDesignWebPage,b.BCName,a.AllowAddNew,a.AppletKind,");
            sql.Append("a.JSCIPTInit,a.JSCIPTBeforeUpdate,a.JSCIPTAfterApplyScript,a.HttpGetScript,a.HttpPostScript,a.PageLoadScript,a.AppletName ");
            sql.Append("from AppletDataSet as a,BusinessTableDataSet as b ");
            sql.Append("where b.BusinessTableDataSetOID=a.BusinessTableOID and a.AppletDataSetOID='" + vcOid + "'");

            SqlCommand    cmd    = new SqlCommand(sql.ToString(), conn);
            SqlDataReader reader = cmd.ExecuteReader();

            //读取VC基本信息
            if (reader.Read())
            {
                vc.VCName            = Util.GetPropString(reader, 0);
                vc.Caption           = Util.GetPropString(reader, 1);
                vc.fTreeGridMode     = Util.GetPropBool(reader, 2);
                vc.fSubTableTreeMode = Util.GetPropBool(reader, 3);
                vc.ImageLink         = Util.GetPropString(reader, 4);
                vc.SubBCs            = Util.GetPropString(reader, 5);
                vc.SubParentFields   = Util.GetPropString(reader, 6);
                vc.SubPicFields      = Util.GetPropString(reader, 7);
                vc.SubLabelFields    = Util.GetPropString(reader, 8);
                vc.SubFKFields       = Util.GetPropString(reader, 9);
                vc.SetVCNode(Util.GetPropString(reader, 10), "div");
                vc.EnabledEdit        = Util.GetPropBool(reader, 11);
                vc.UserDefineHTML     = Util.GetPropBool(reader, 12);
                vc.BCName             = Util.GetPropString(reader, 13);
                vc.haveMenu           = Util.GetPropBool(reader, 14);
                vc.Kind               = Util.GetProperInt(reader, 15);
                vc.InitScript         = Util.GetPropString(reader, 16);
                vc.BeforeUpdateScript = Util.GetPropString(reader, 17);
                vc.AfterApplyScript   = Util.GetPropString(reader, 18);
                vc.HttpGetCSharpCode  = Util.GetPropString(reader, 19);
                vc.HttpPostCSharpCode = Util.GetPropString(reader, 20);
                vc.PageLoadCSharpCode = Util.GetPropString(reader, 21);
                vc.VCName             = Util.GetPropString(reader, 22);
            }
            reader.Close();
            vc.Columns = GetVcColumn(conn, vc.OID);
            vc.Buttons = GetVcButton(conn, vc.OID);
            return(vc);
        }
Esempio n. 2
0
        public static List<UcmlVcTabPage> GetVcTab(SqlConnection conn, string bpoid)
        {
            List<UcmlVcTabPage> tabList = new List<UcmlVcTabPage>();
            List<UcmlViewCompnent> vcList = new List<UcmlViewCompnent>();

            //构造SQL函数,获取BPO下的所有VC
            StringBuilder sql = new StringBuilder("select ");
            sql.Append("a.BusiViewCompLinkDataSetOID,a.ParentOID,b.AppletName,b.Caption,b.fTreeGridMode,b.fSubTableTreeMode,b.ImageLink,");
            sql.Append("b.SubBCs,b.SubParentFields,b.SubPicFields,b.SubLabelFields,b.SubFKFields,b.TargetHTMLSource ,b.AllowEdit,a.fHidden,");
            sql.Append("b.UserDesignWebPage,a.alignHeight,a.alignWidth,c.BCName,b.AppletDataSetOID,b.AllowAddNew,b.AppletKind,");
            sql.Append("b.JSCIPTInit,b.JSCIPTBeforeUpdate,b.JSCIPTAfterApplyScript,b.HttpGetScript,b.HttpPostScript,b.PageLoadScript");
            sql.Append(" from BusiViewCompLinkDataSet as a,AppletDataSet as b,BusinessTableDataSet as c ");
            sql.Append("where a.AppletOID=b.AppletDataSetOID and c.BusinessTableDataSetOID=b.BusinessTableOID and a.UCMLClassOID='" + bpoid+"'");

            SqlCommand cmd = new SqlCommand(sql.ToString(), conn);
            SqlDataReader reader = cmd.ExecuteReader();

            //读取VC基本信息
            while (reader.Read())
            {
                UcmlViewCompnent vc = new UcmlViewCompnent();
                vc.LinkOID = Util.GetProperGuid(reader, 0);
                vc.LinkPOID = Util.GetProperGuid(reader, 1);
                vc.VCName = Util.GetPropString(reader, 2);
                vc.Caption = Util.GetPropString(reader, 3);
                vc.fTreeGridMode = Util.GetPropBool(reader, 4);
                vc.fSubTableTreeMode = Util.GetPropBool(reader, 5);
                vc.ImageLink = Util.GetPropString(reader, 6);
                vc.SubBCs = Util.GetPropString(reader, 7);
                vc.SubParentFields = Util.GetPropString(reader, 8);
                vc.SubPicFields = Util.GetPropString(reader, 9);
                vc.SubLabelFields = Util.GetPropString(reader, 10);
                vc.SubFKFields = Util.GetPropString(reader, 11);
                vc.SetVCNode(Util.GetPropString(reader, 12), "div");
                vc.EnabledEdit = Util.GetPropBool(reader, 13);
                vc.fHidden = Util.GetPropBool(reader, 14);
                vc.UserDefineHTML = Util.GetPropBool(reader, 15);
                vc.alignHeight = Util.GetPropBool(reader, 16);
                vc.alignWidth = Util.GetPropBool(reader, 17);
                vc.BCName = Util.GetPropString(reader, 18);
                vc.OID = Util.GetProperGuid(reader, 19);
                vc.haveMenu = Util.GetPropBool(reader, 20);
                vc.Kind = Util.GetProperInt(reader, 21);
                vc.InitScript = Util.GetPropString(reader, 22);
                vc.BeforeUpdateScript = Util.GetPropString(reader, 23);
                vc.AfterApplyScript = Util.GetPropString(reader, 24);
                vc.HttpGetCSharpCode = Util.GetPropString(reader, 25);
                vc.HttpPostCSharpCode = Util.GetPropString(reader, 26);
                vc.PageLoadCSharpCode = Util.GetPropString(reader, 27);

                vcList.Add(vc);
            }

            //关闭SqlDataReader
            reader.Close();

            foreach (UcmlViewCompnent vc in vcList)
            {
                //加载列信息
                vc.Columns = GetVcColumn(conn, vc.OID);
                vc.Buttons = GetVcButton(conn, vc.OID);
            }

            //将VC按照POID分类在不同的VCTab中
            List<string> OIDList = new List<string>();
            string tmpOID = "";
            for (int i = 0; i < vcList.Count; i++)
            {
                if (OIDList.Contains(vcList[i].LinkPOID)) continue;
                tmpOID = vcList[i].LinkPOID;
                UcmlVcTabPage vcTab = new UcmlVcTabPage();
                vcTab.Name = vcList[i].VCName;
                vcTab.Caption = vcList[i].Caption;
                vcTab.ParentOID = vcList[i].LinkPOID;
                vcTab.VCList.Add(vcList[i]);

                for (int j = i + 1; j < vcList.Count; j++)
                {
                    if (vcList[j].LinkPOID == tmpOID)
                    {
                        vcTab.VCList.Add(vcList[j]);
                        vcList.Remove(vcList[j]);
                    }
                }
                OIDList.Add(tmpOID);
                tabList.Add(vcTab);
            }

            return tabList;
        }
Esempio n. 3
0
        public static UcmlViewCompnent GetVC(SqlConnection conn, string vcOid)
        {
            UcmlViewCompnent vc = new UcmlViewCompnent();
            vc.OID = vcOid;
            StringBuilder sql = new StringBuilder("select ");
            sql.Append("a.AppletName,a.Caption,a.fTreeGridMode,a.fSubTableTreeMode,a.ImageLink,a.SubBCs,a.SubParentFields,a.SubPicFields,");
            sql.Append("a.SubLabelFields,a.SubFKFields,a.TargetHTMLSource ,a.AllowEdit,a.UserDesignWebPage,b.BCName,a.AllowAddNew,a.AppletKind,");
            sql.Append("a.JSCIPTInit,a.JSCIPTBeforeUpdate,a.JSCIPTAfterApplyScript,a.HttpGetScript,a.HttpPostScript,a.PageLoadScript,a.AppletName ");
            sql.Append("from AppletDataSet as a,BusinessTableDataSet as b ");
            sql.Append("where b.BusinessTableDataSetOID=a.BusinessTableOID and a.AppletDataSetOID='" + vcOid+"'");

            SqlCommand cmd = new SqlCommand(sql.ToString(), conn);
            SqlDataReader reader = cmd.ExecuteReader();

            //读取VC基本信息
            if (reader.Read())
            {
                vc.VCName = Util.GetPropString(reader, 0);
                vc.Caption = Util.GetPropString(reader, 1);
                vc.fTreeGridMode = Util.GetPropBool(reader, 2);
                vc.fSubTableTreeMode = Util.GetPropBool(reader, 3);
                vc.ImageLink = Util.GetPropString(reader, 4);
                vc.SubBCs = Util.GetPropString(reader, 5);
                vc.SubParentFields = Util.GetPropString(reader, 6);
                vc.SubPicFields = Util.GetPropString(reader, 7);
                vc.SubLabelFields = Util.GetPropString(reader, 8);
                vc.SubFKFields = Util.GetPropString(reader, 9);
                vc.SetVCNode(Util.GetPropString(reader, 10), "div");
                vc.EnabledEdit = Util.GetPropBool(reader, 11);
                vc.UserDefineHTML = Util.GetPropBool(reader, 12);
                vc.BCName = Util.GetPropString(reader, 13);
                vc.haveMenu = Util.GetPropBool(reader, 14);
                vc.Kind = Util.GetProperInt(reader, 15);
                vc.InitScript = Util.GetPropString(reader, 16);
                vc.BeforeUpdateScript = Util.GetPropString(reader, 17);
                vc.AfterApplyScript = Util.GetPropString(reader, 18);
                vc.HttpGetCSharpCode = Util.GetPropString(reader, 19);
                vc.HttpPostCSharpCode = Util.GetPropString(reader, 20);
                vc.PageLoadCSharpCode = Util.GetPropString(reader, 21);
                vc.VCName = Util.GetPropString(reader, 22);
            }
            reader.Close();
            vc.Columns = GetVcColumn(conn, vc.OID);
            vc.Buttons = GetVcButton(conn, vc.OID);
            return vc;
        }
Esempio n. 4
0
        public static List <UcmlVcTabPage> GetVcTab(SqlConnection conn, string bpoid)
        {
            List <UcmlVcTabPage>    tabList = new List <UcmlVcTabPage>();
            List <UcmlViewCompnent> vcList  = new List <UcmlViewCompnent>();

            //构造SQL函数,获取BPO下的所有VC
            StringBuilder sql = new StringBuilder("select ");

            sql.Append("a.BusiViewCompLinkDataSetOID,a.ParentOID,b.AppletName,b.Caption,b.fTreeGridMode,b.fSubTableTreeMode,b.ImageLink,");
            sql.Append("b.SubBCs,b.SubParentFields,b.SubPicFields,b.SubLabelFields,b.SubFKFields,b.TargetHTMLSource ,b.AllowEdit,a.fHidden,");
            sql.Append("b.UserDesignWebPage,a.alignHeight,a.alignWidth,c.BCName,b.AppletDataSetOID,b.AllowAddNew,b.AppletKind,");
            sql.Append("b.JSCIPTInit,b.JSCIPTBeforeUpdate,b.JSCIPTAfterApplyScript,b.HttpGetScript,b.HttpPostScript,b.PageLoadScript");
            sql.Append(" from BusiViewCompLinkDataSet as a,AppletDataSet as b,BusinessTableDataSet as c ");
            sql.Append("where a.AppletOID=b.AppletDataSetOID and c.BusinessTableDataSetOID=b.BusinessTableOID and a.UCMLClassOID='" + bpoid + "'");

            SqlCommand    cmd    = new SqlCommand(sql.ToString(), conn);
            SqlDataReader reader = cmd.ExecuteReader();

            //读取VC基本信息
            while (reader.Read())
            {
                UcmlViewCompnent vc = new UcmlViewCompnent();
                vc.LinkOID           = Util.GetProperGuid(reader, 0);
                vc.LinkPOID          = Util.GetProperGuid(reader, 1);
                vc.VCName            = Util.GetPropString(reader, 2);
                vc.Caption           = Util.GetPropString(reader, 3);
                vc.fTreeGridMode     = Util.GetPropBool(reader, 4);
                vc.fSubTableTreeMode = Util.GetPropBool(reader, 5);
                vc.ImageLink         = Util.GetPropString(reader, 6);
                vc.SubBCs            = Util.GetPropString(reader, 7);
                vc.SubParentFields   = Util.GetPropString(reader, 8);
                vc.SubPicFields      = Util.GetPropString(reader, 9);
                vc.SubLabelFields    = Util.GetPropString(reader, 10);
                vc.SubFKFields       = Util.GetPropString(reader, 11);
                vc.SetVCNode(Util.GetPropString(reader, 12), "div");
                vc.EnabledEdit        = Util.GetPropBool(reader, 13);
                vc.fHidden            = Util.GetPropBool(reader, 14);
                vc.UserDefineHTML     = Util.GetPropBool(reader, 15);
                vc.alignHeight        = Util.GetPropBool(reader, 16);
                vc.alignWidth         = Util.GetPropBool(reader, 17);
                vc.BCName             = Util.GetPropString(reader, 18);
                vc.OID                = Util.GetProperGuid(reader, 19);
                vc.haveMenu           = Util.GetPropBool(reader, 20);
                vc.Kind               = Util.GetProperInt(reader, 21);
                vc.InitScript         = Util.GetPropString(reader, 22);
                vc.BeforeUpdateScript = Util.GetPropString(reader, 23);
                vc.AfterApplyScript   = Util.GetPropString(reader, 24);
                vc.HttpGetCSharpCode  = Util.GetPropString(reader, 25);
                vc.HttpPostCSharpCode = Util.GetPropString(reader, 26);
                vc.PageLoadCSharpCode = Util.GetPropString(reader, 27);

                vcList.Add(vc);
            }

            //关闭SqlDataReader
            reader.Close();

            foreach (UcmlViewCompnent vc in vcList)
            {
                //加载列信息
                vc.Columns = GetVcColumn(conn, vc.OID);
                vc.Buttons = GetVcButton(conn, vc.OID);
            }

            //将VC按照POID分类在不同的VCTab中
            List <string> OIDList = new List <string>();
            string        tmpOID  = "";

            for (int i = 0; i < vcList.Count; i++)
            {
                if (OIDList.Contains(vcList[i].LinkPOID))
                {
                    continue;
                }
                tmpOID = vcList[i].LinkPOID;
                UcmlVcTabPage vcTab = new UcmlVcTabPage();
                vcTab.Name      = vcList[i].VCName;
                vcTab.Caption   = vcList[i].Caption;
                vcTab.ParentOID = vcList[i].LinkPOID;
                vcTab.VCList.Add(vcList[i]);

                for (int j = i + 1; j < vcList.Count; j++)
                {
                    if (vcList[j].LinkPOID == tmpOID)
                    {
                        vcTab.VCList.Add(vcList[j]);
                        vcList.Remove(vcList[j]);
                    }
                }
                OIDList.Add(tmpOID);
                tabList.Add(vcTab);
            }

            return(tabList);
        }
Esempio n. 5
0
 public void Add(UcmlViewCompnent vc)
 {
     VCList.Add(vc);
 }
Esempio n. 6
0
 public void Add(UcmlViewCompnent vc)
 {
     VCList.Add(vc);
 }