예제 #1
0
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WSingle_WSingle));
     this.WMaster = new Srvtools.WebDataSet();
     ((System.ComponentModel.ISupportInitialize)(this.WMaster)).BeginInit();
     //
     // WMaster
     //
     this.WMaster.Active = false;
     this.WMaster.AlwaysClose = false;
     this.WMaster.PacketRecords = 100;
     this.WMaster.Position = -1;
     this.WMaster.RemoteName = null;
     this.WMaster.ServerModify = false;
     ((System.ComponentModel.ISupportInitialize)(this.WMaster)).EndInit();
 }
예제 #2
0
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WReport1));
     this.WData = new Srvtools.WebDataSet();
     ((System.ComponentModel.ISupportInitialize)(this.WData)).BeginInit();
     //
     // WData
     //
     this.WData.Active = false;
     this.WData.AlwaysClose = false;
     this.WData.Guid = null;
     this.WData.LastKeyValues = null;
     this.WData.PacketRecords = -1;
     this.WData.Position = -1;
     this.WData.RemoteName = "";
     this.WData.ServerModify = false;
     ((System.ComponentModel.ISupportInitialize)(this.WData)).EndInit();
 }
예제 #3
0
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Template_Wsingle3));
     this.WMaster = new Srvtools.WebDataSet();
     ((System.ComponentModel.ISupportInitialize)(this.WMaster)).BeginInit();
     //
     // WMaster
     //
     this.WMaster.Active = false;
     this.WMaster.AlwaysClose = false;
     this.WMaster.DeleteIncomplete = true;
     this.WMaster.Guid = null;
     this.WMaster.LastKeyValues = null;
     this.WMaster.Locale = new System.Globalization.CultureInfo("zh-CN");
     this.WMaster.PacketRecords = 100;
     this.WMaster.Position = -1;
     this.WMaster.RemoteName = null;
     this.WMaster.ServerModify = false;
     ((System.ComponentModel.ISupportInitialize)(this.WMaster)).EndInit();
 }
예제 #4
0
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Template_WMasterDetailReport));
     this.WMaster = new Srvtools.WebDataSet();
     this.WDetail = new Srvtools.WebDataSet();
     ((System.ComponentModel.ISupportInitialize)(this.WMaster)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.WDetail)).BeginInit();
     //
     // WMaster
     //
     this.WMaster.Active = false;
     this.WMaster.AlwaysClose = true;
     this.WMaster.DeleteIncomplete = true;
     this.WMaster.Guid = "522577e4-34b7-402c-801d-0c4256675bfc";
     this.WMaster.LastKeyValues = null;
     this.WMaster.Locale = new System.Globalization.CultureInfo("zh-CN");
     this.WMaster.PacketRecords = 100;
     this.WMaster.Position = -1;
     this.WMaster.RemoteName = null;
     this.WMaster.ServerModify = false;
     //
     // WDetail
     //
     this.WDetail.Active = false;
     this.WDetail.AlwaysClose = false;
     this.WDetail.DeleteIncomplete = true;
     this.WDetail.Guid = "77df1b03-e43c-45f8-a8ec-80060a1a60e2";
     this.WDetail.LastKeyValues = null;
     this.WDetail.Locale = new System.Globalization.CultureInfo("zh-CN");
     this.WDetail.PacketRecords = 100;
     this.WDetail.Position = -1;
     this.WDetail.RemoteName = null;
     this.WDetail.ServerModify = false;
     ((System.ComponentModel.ISupportInitialize)(this.WMaster)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.WDetail)).EndInit();
 }
예제 #5
0
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WebManager_WebOrgLevel));
     this.wOrgLevel = new Srvtools.WebDataSet();
     this.wOrgKind = new Srvtools.WebDataSet();
     ((System.ComponentModel.ISupportInitialize)(this.wOrgLevel)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.wOrgKind)).BeginInit();
     //
     // wOrgLevel
     //
     this.wOrgLevel.Active = true;
     this.wOrgLevel.AlwaysClose = false;
     this.wOrgLevel.DeleteIncomplete = true;
     this.wOrgLevel.Guid = "018297d2-4e4c-4a5f-adfd-6d59c3ca41d2";
     this.wOrgLevel.LastKeyValues = null;
     this.wOrgLevel.Locale = new System.Globalization.CultureInfo("zh-CN");
     this.wOrgLevel.PacketRecords = 100;
     this.wOrgLevel.Position = -1;
     this.wOrgLevel.RemoteName = "GLModule.cmdOrgLevel";
     this.wOrgLevel.ServerModify = false;
     //
     // wOrgKind
     //
     this.wOrgKind.Active = true;
     this.wOrgKind.AlwaysClose = false;
     this.wOrgKind.DeleteIncomplete = true;
     this.wOrgKind.Guid = "669b01fa-ee5b-4b6a-b267-fed3ea68cbe4";
     this.wOrgKind.LastKeyValues = null;
     this.wOrgKind.Locale = new System.Globalization.CultureInfo("zh-CN");
     this.wOrgKind.PacketRecords = 100;
     this.wOrgKind.Position = -1;
     this.wOrgKind.RemoteName = "GLModule.cmdOrgKind";
     this.wOrgKind.ServerModify = false;
     ((System.ComponentModel.ISupportInitialize)(this.wOrgLevel)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.wOrgKind)).EndInit();
 }
예제 #6
0
    private void CreatDataSet(string datasetid)
    {
        XmlDocument xmlDoc = new XmlDocument();
        string resourceName = psyPath + ".vi-VN.resx";
        ResXResourceReader reader = new ResXResourceReader(resourceName);
        IDictionaryEnumerator enumerator = reader.GetEnumerator();
        while (enumerator.MoveNext())
        {
            if (enumerator.Key.ToString() == "WebDataSets")
            {
                string sXml = (string)enumerator.Value;
                xmlDoc.LoadXml(sXml);
                break;
            }
        }
        if (xmlDoc != null)
        {
            XmlNode nWDSs = xmlDoc.SelectSingleNode("WebDataSets");
            if (nWDSs != null)
            {
                XmlNode nWDS = nWDSs.SelectSingleNode("WebDataSet[@Name='" + datasetid + "']");
                if (nWDS != null)
                {
                    string remoteName = "";
                    int packetRecords = 100;
                    bool active = false;
                    bool serverModify = false;

                    XmlNode nRemoteName = nWDS.SelectSingleNode("RemoteName");
                    if (nRemoteName != null)
                        remoteName = nRemoteName.InnerText;

                    XmlNode nPacketRecords = nWDS.SelectSingleNode("PacketRecords");
                    if (nPacketRecords != null)
                        packetRecords = nPacketRecords.InnerText.Length == 0 ? 100 : Convert.ToInt32(nPacketRecords.InnerText);

                    XmlNode nActive = nWDS.SelectSingleNode("Active");
                    if (nActive != null)
                        active = nActive.InnerText.Length == 0 ? false : Convert.ToBoolean(nActive.InnerText);

                    XmlNode nServerModify = nWDS.SelectSingleNode("ServerModify");
                    if (nServerModify != null)
                        serverModify = nServerModify.InnerText.Length == 0 ? false : Convert.ToBoolean(nServerModify.InnerText);

                    WebDataSet wds = new WebDataSet();
                    wds.RemoteName = remoteName;
                    wds.PacketRecords = packetRecords;
                    wds.ServerModify = serverModify;
                    wds.Active = true;

                    dt = wds.RealDataSet.Tables[dataMember];
                    int rowcount = dt.Rows.Count;
                    lstnode = new ListItem[rowcount];
                    for (int i = 0; i < rowcount; i++)
                    {
                        lstnode[i] = new ListItem();
                        lstnode[i].Text = dt.Rows[i][strTextField].ToString();
                        lstnode[i].Value = dt.Rows[i][strKeyField].ToString();
                        lstkey.Add(dt.Rows[i][strKeyField]);
                    }
                }
            }
        }
    }
예제 #7
0
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(InnerPages_WebAccessMenu));
     this.WSolution = new Srvtools.WebDataSet();
     this.WUser = new Srvtools.WebDataSet();
     this.WMenu = new Srvtools.WebDataSet();
     this.WUserMenus = new Srvtools.WebDataSet();
     this.WGroupMenus = new Srvtools.WebDataSet();
     this.WGroup = new Srvtools.WebDataSet();
     ((System.ComponentModel.ISupportInitialize)(this.WSolution)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.WUser)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.WMenu)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.WUserMenus)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.WGroupMenus)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.WGroup)).BeginInit();
     //
     // WSolution
     //
     this.WSolution.Active = true;
     this.WSolution.AlwaysClose = false;
     this.WSolution.Guid = "2611c6b5-e43b-4924-8431-af26e5485624";
     this.WSolution.LastKeyValues = null;
     this.WSolution.PacketRecords = -1;
     this.WSolution.Position = -1;
     this.WSolution.RemoteName = "GLModule.solutionInfo";
     this.WSolution.ServerModify = false;
     this.WSolution.WhereStr = "";
     //
     // WUser
     //
     this.WUser.Active = true;
     this.WUser.AlwaysClose = false;
     this.WUser.Guid = "ebeea10f-7b89-48db-990f-886a772e7eb1";
     this.WUser.LastKeyValues = null;
     this.WUser.PacketRecords = -1;
     this.WUser.Position = -1;
     this.WUser.RemoteName = "GLModule.userInfo";
     this.WUser.ServerModify = false;
     this.WUser.WhereStr = "";
     //
     // WMenu
     //
     this.WMenu.Active = true;
     this.WMenu.AlwaysClose = false;
     this.WMenu.Guid = "b0c3a6ca-10f9-49ef-90cf-3e4aec5510ab";
     this.WMenu.LastKeyValues = null;
     this.WMenu.PacketRecords = -1;
     this.WMenu.Position = -1;
     this.WMenu.RemoteName = "GLModule.sqlMenus";
     this.WMenu.ServerModify = false;
     this.WMenu.WhereStr = "";
     //
     // WUserMenus
     //
     this.WUserMenus.Active = true;
     this.WUserMenus.AlwaysClose = false;
     this.WUserMenus.Guid = "ec1e19a8-8dce-4111-9fa9-a5a822f883cb";
     this.WUserMenus.LastKeyValues = null;
     this.WUserMenus.PacketRecords = -1;
     this.WUserMenus.Position = -1;
     this.WUserMenus.RemoteName = "GLModule.userMenus";
     this.WUserMenus.ServerModify = false;
     this.WUserMenus.WhereStr = "";
     //
     // WGroupMenus
     //
     this.WGroupMenus.Active = true;
     this.WGroupMenus.AlwaysClose = false;
     this.WGroupMenus.Guid = "5a4b8cd9-fcb5-4c02-88d5-02b1386b006d";
     this.WGroupMenus.LastKeyValues = null;
     this.WGroupMenus.PacketRecords = -1;
     this.WGroupMenus.Position = -1;
     this.WGroupMenus.RemoteName = "GLModule.sqlMGroupMenus";
     this.WGroupMenus.ServerModify = false;
     this.WGroupMenus.WhereStr = "";
     //
     // WGroup
     //
     this.WGroup.Active = true;
     this.WGroup.AlwaysClose = false;
     this.WGroup.Guid = "abbb2fe8-b472-45ad-a6d1-3b098bbdfb53";
     this.WGroup.LastKeyValues = null;
     this.WGroup.PacketRecords = -1;
     this.WGroup.Position = -1;
     this.WGroup.RemoteName = "GLModule.groupInfo";
     this.WGroup.ServerModify = false;
     this.WGroup.WhereStr = "";
     ((System.ComponentModel.ISupportInitialize)(this.WSolution)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.WUser)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.WMenu)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.WUserMenus)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.WGroupMenus)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.WGroup)).EndInit();
 }
예제 #8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            InitializeComponent();
            wdsSolution.DataSource = WSolution;
            GroupMenus = WGroupMenus;
            UserMenus = WUserMenus;
            Menu = WMenu;
            this.ddlSolution.DataBind();

            if (Session["State"] != null)
            {
                if (Session["State"].ToString() == "X")
                {
                    Label1.Visible = false;
                    Label2.Visible = false;
                    ddlCopy.Visible = false;
                    ddlSolution.Visible = false;
                    btnApply.Visible = false;
                    btnEqual.Visible = false;
                    btnCopy.Visible = false;
                    btnSelectAll.Visible = false;
                    btnCancelAll.Visible = false;
                }
                else if (Session["State"].ToString() == "U")
                {
                    String lID = Session["UserID"].ToString();

                    for (int i = 0; i < WUser.RealDataSet.Tables[0].Rows.Count; i++)
                        if (WUser.RealDataSet.Tables[0].Rows[i]["USERID"].ToString() != lID)
                            ddlCopy.Items.Add(WUser.RealDataSet.Tables[0].Rows[i]["USERID"].ToString());

                    Menu.SetWhere("ITEMTYPE='" + this.ddlSolution.SelectedValue + "'");
                    cblMenu.DataSource = Menu;
                    cblMenu.DataValueField = "MENUID";
                    cblMenu.DataTextField = "CAPTION";
                    cblMenu.DataBind();

                    //WUserMenus.SetWhere("USERID='" + lID + "'");
                    for (int i = 0; i < WUserMenus.RealDataSet.Tables[0].Rows.Count; i++)
                    {
                        for (int j = 0; j < cblMenu.Items.Count; j++)
                        {
                            string text = cblMenu.Items[j].Value;

                            if (WUserMenus.RealDataSet.Tables[0].Rows[i]["USERID"].ToString() == lID && WUserMenus.RealDataSet.Tables[0].Rows[i]["MENUID"].ToString() == text)
                            {
                                cblMenu.Items[j].Selected = true;
                                break;
                            }
                        }
                    }
                }
                else if (Session["State"].ToString() == "G")
                {
                    String lID = Session["GroupID"].ToString();

                    for (int i = 0; i < WGroup.RealDataSet.Tables[0].Rows.Count; i++)
                        if (WGroup.RealDataSet.Tables[0].Rows[i]["GROUPID"].ToString() != lID)
                            ddlCopy.Items.Add(WGroup.RealDataSet.Tables[0].Rows[i]["GROUPID"].ToString());

                    Menu.SetWhere("ITEMTYPE='" + this.ddlSolution.SelectedValue + "'");
                    cblMenu.DataSource = Menu;
                    cblMenu.DataValueField = "MENUID";
                    cblMenu.DataTextField = "CAPTION";
                    cblMenu.DataBind();

                    //WGroupMenus.SetWhere("GROUPID='" + lID + "'");
                    for (int i = 0; i < WGroupMenus.RealDataSet.Tables[0].Rows.Count; i++)
                    {
                        for (int j = 0; j < cblMenu.Items.Count; j++)
                        {
                            string text = cblMenu.Items[j].Value;
                            if (WGroupMenus.RealDataSet.Tables[0].Rows[i]["GROUPID"].ToString() == lID && WGroupMenus.RealDataSet.Tables[0].Rows[i]["MENUID"].ToString() == text)
                            {
                                cblMenu.Items[j].Selected = true;
                                break;
                            }
                        }
                    }
                }
            }
        }
    }
예제 #9
0
        public DataTable GetSchema()
        {
            if (string.IsNullOrEmpty(DataMember))
            {
                throw new EEPException(EEPException.ExceptionType.PropertyNull, this.GetType(), this.ID, "DataMember", null);
            }

            string keyName = "WebDataSets";
            string aspxName = EditionDifference.ActiveDocumentFullName();

            string resourceName = aspxName + @".vi-VN.resx";
            ResXResourceReader reader = new ResXResourceReader(resourceName);
            IDictionaryEnumerator enumerator = reader.GetEnumerator();

            XmlDocument xmlDoc = new XmlDocument();
            while (enumerator.MoveNext())
            {
                if (enumerator.Key.ToString() == keyName)
                {
                    string sXml = (string)enumerator.Value;
                    xmlDoc.LoadXml(sXml);
                    break;
                }
            }
            reader.Close();

            if (xmlDoc == null) return null;

            XmlNode nWDSs = xmlDoc.SelectSingleNode("WebDataSets");
            if (nWDSs == null) return null;

            XmlNode nWDS = nWDSs.SelectSingleNode("WebDataSet[@Name='" + _webDataSetID + "']");
            if (nWDS == null) return null;

            string remoteName = "";
            int packetRecords = 100;
            bool active = false;
            bool serverModify = false;

            XmlNode nRemoteName = nWDS.SelectSingleNode("RemoteName");
            if (nRemoteName != null)
                remoteName = nRemoteName.InnerText;

            XmlNode nPacketRecords = nWDS.SelectSingleNode("PacketRecords");
            if (nPacketRecords != null)
                packetRecords = nPacketRecords.InnerText.Length == 0 ? 100 : Convert.ToInt32(nPacketRecords.InnerText);

            XmlNode nActive = nWDS.SelectSingleNode("Active");
            if (nActive != null)
                active = nActive.InnerText.Length == 0 ? false : Convert.ToBoolean(nActive.InnerText);

            XmlNode nServerModify = nWDS.SelectSingleNode("ServerModify");
            if (nServerModify != null)
                serverModify = nServerModify.InnerText.Length == 0 ? false : Convert.ToBoolean(nServerModify.InnerText);

            WebDataSet wds = new WebDataSet(true);
            wds.RemoteName = remoteName;
            wds.PacketRecords = packetRecords;
            wds.ServerModify = serverModify;
            wds.Active = true;

            DataTable table2 = wds.RealDataSet.Tables[DataMember].Clone();
            table2.Rows.Clear();

            return table2;
        }
예제 #10
0
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(InnerPages_WebGControlAdd));
     this.WGroup = new Srvtools.WebDataSet();
     this.WUser = new Srvtools.WebDataSet();
     ((System.ComponentModel.ISupportInitialize)(this.WGroup)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.WUser)).BeginInit();
     //
     // WGroup
     //
     this.WGroup.Active = true;
     this.WGroup.AlwaysClose = false;
     this.WGroup.DeleteIncomplete = true;
     this.WGroup.Guid = "69ebc916-8f45-4265-972f-2959809e2a02";
     this.WGroup.LastKeyValues = null;
     this.WGroup.Locale = new System.Globalization.CultureInfo("zh-CN");
     this.WGroup.PacketRecords = -1;
     this.WGroup.Position = -1;
     this.WGroup.RemoteName = "GLModule.groupInfo";
     this.WGroup.ServerModify = false;
     //
     // WUser
     //
     this.WUser.Active = true;
     this.WUser.AlwaysClose = false;
     this.WUser.DeleteIncomplete = true;
     this.WUser.Guid = "10684bb2-5e9c-4385-9b1f-e9c71d4c5b4b";
     this.WUser.LastKeyValues = null;
     this.WUser.Locale = new System.Globalization.CultureInfo("zh-CN");
     this.WUser.PacketRecords = -1;
     this.WUser.Position = -1;
     this.WUser.RemoteName = "GLModule.userInfo";
     this.WUser.ServerModify = false;
     ((System.ComponentModel.ISupportInitialize)(this.WGroup)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.WUser)).EndInit();
 }
예제 #11
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         InitializeComponent();
         wdsUser.DataSource = WUser;
         wdsGroup.DataSource = WGroup;
         this.labelMenuID.Text = Session["MenuID"].ToString();
         DataBase = Session["DataBase"].ToString();
         user = WUser;
     }
 }
예제 #12
0
        public static void WebCreateXSD(IDesignerHost FDesignerHost, ClientParam cParam, WebClientParam wecParam, Project proj)
        {
            WebDataSet aWebDataSet = new WebDataSet();

            ProjectItem webformDir = ReportCreator.FindProjectItem(proj, wecParam.FolderName);

            if (aWebDataSet != null)
            {
                aWebDataSet.SetWizardDesignMode(true);
                aWebDataSet.RemoteName = cParam.ProviderName;
                aWebDataSet.PacketRecords = 100;
                aWebDataSet.Active = true;

                String s;
                s = EEPRegistry.WebClient;

                string filePath = s + "\\" + wecParam.FolderName + "\\";
                bool CreateFileSucess = true;
                string fileName = "";
                try
                {
                    fileName = filePath + cParam.FormName + ".xsd";
                    aWebDataSet.RealDataSet.WriteXmlSchema(fileName);
                }
                catch
                {
                    CreateFileSucess = false;
                    MessageBox.Show("Failed to create xsd file!");
                }
                finally
                {
                    if (CreateFileSucess && File.Exists(fileName))
                    {
                        webformDir.ProjectItems.AddFromFile(fileName);
                    }
                    if (aWebDataSet != null)
                    {
                        aWebDataSet.Dispose();
                    }
                }
            }
        }
예제 #13
0
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Template_WMasterDetail3));
     this.WMaster = new Srvtools.WebDataSet();
     this.WView = new Srvtools.WebDataSet();
     ((System.ComponentModel.ISupportInitialize)(this.WMaster)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.WView)).BeginInit();
     //
     // WMaster
     //
     this.WMaster.Active = false;
     this.WMaster.AlwaysClose = true;
     this.WMaster.Guid = null;
     this.WMaster.LastKeyValues = null;
     this.WMaster.PacketRecords = 100;
     this.WMaster.Position = -1;
     this.WMaster.RemoteName = null;
     this.WMaster.ServerModify = false;
     //
     // WView
     //
     this.WView.Active = false;
     this.WView.AlwaysClose = false;
     this.WView.Guid = "2c363173-ea0b-47df-8082-340176b68302";
     this.WView.LastKeyValues = null;
     this.WView.PacketRecords = 100;
     this.WView.Position = -1;
     this.WView.RemoteName = null;
     this.WView.ServerModify = false;
     ((System.ComponentModel.ISupportInitialize)(this.WMaster)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.WView)).EndInit();
 }
예제 #14
0
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WebMenuUtilityMain));
     this.WMaster = new Srvtools.WebDataSet();
     ((System.ComponentModel.ISupportInitialize)(this.WMaster)).BeginInit();
     //
     // WMaster
     //
     this.WMaster.Active = true;
     this.WMaster.AlwaysClose = false;
     this.WMaster.Guid = "70578348-2e2e-43bb-bd27-37b8d9ab9d73";
     this.WMaster.LastKeyValues = null;
     this.WMaster.PacketRecords = 100;
     this.WMaster.Position = -1;
     this.WMaster.RemoteName = "GLModule.sqlMenus";
     this.WMaster.ServerModify = false;
     this.WMaster.WhereStr = "";
     ((System.ComponentModel.ISupportInitialize)(this.WMaster)).EndInit();
 }
예제 #15
0
        private DataTable GetSchemaTable()
        {
            WebDataSource comp = (WebDataSource)this.Component;
            if (comp == null)
                return null;

            if (comp.SelectCommand != null && comp.SelectCommand.Length != 0 && comp.SelectAlias != null && comp.SelectAlias.Length != 0)
            {
                string pro = CliUtils.fCurrentProject;
                if (pro == null || pro.Length == 0)
                {
                    pro = EditionDifference.ActiveSolutionName();
                }

                string CommandText = CliUtils.InsertWhere(comp.SelectCommand, "1=0");

                DataSet ds = CliUtils.ExecuteSql("GLModule", "cmdRefValUse", CommandText, comp.SelectAlias, true, pro);

                if (ds != null && ds.Tables.Count != 0)
                    return ds.Tables[0];
                else
                    return (new DataTable("Table1"));
            }
            else
            {
                string keyName = string.Empty;
                if (!string.IsNullOrEmpty(comp.WebDataSetID))
                {
                    keyName = "WebDataSets";
                }
            #if VS90
                else if (!string.IsNullOrEmpty(comp.LinqDataSetID))
                {
                    keyName = "LinqDataSets";
                }
            #endif

                CultureInfo culture = new CultureInfo("vi-VN");
                string aspxName = EditionDifference.ActiveDocumentFullName();

                XmlDocument xmlDoc = new XmlDocument();
                string resourceName = aspxName + @".vi-VN.resx";
                // ResXResourceReader reader = new ResXResourceReader(s + resourceName);
                ResXResourceReader reader = new ResXResourceReader(resourceName);
                IDictionaryEnumerator enumerator = reader.GetEnumerator();

                while (enumerator.MoveNext())
                {
                    if (enumerator.Key.ToString() == keyName)
                    {
                        string sXml = (string)enumerator.Value;
                        xmlDoc.LoadXml(sXml);
                        break;
                    }
                }
                reader.Close();

                if (xmlDoc == null) return null;

                XmlNode nWDSs = null;
                XmlNode nWDS = null;

                if (!string.IsNullOrEmpty(comp.WebDataSetID))
                {
                    nWDSs =  xmlDoc.SelectSingleNode("WebDataSets");
                    if (nWDSs == null) return null;
                    nWDS = nWDSs.SelectSingleNode("WebDataSet[@Name='" + comp.WebDataSetID + "']");
                    if (nWDS == null) return null;
                }
            #if VS90
                else if (!string.IsNullOrEmpty(comp.LinqDataSetID))
                {
                    nWDSs = xmlDoc.SelectSingleNode("LinqDataSets");
                    if (nWDSs == null) return null;
                    nWDS = nWDSs.SelectSingleNode("LinqDataSet[@Name='" + comp.LinqDataSetID + "']");
                    if (nWDS == null) return null;
                }
            #endif
                string remoteName = "";
                int packetRecords = 100;
                bool active = false;
                bool serverModify = false;
                bool alwaysClose = false;

                XmlNode nRemoteName = nWDS.SelectSingleNode("RemoteName");
                if (nRemoteName != null)
                    remoteName = nRemoteName.InnerText;

                XmlNode nPacketRecords = nWDS.SelectSingleNode("PacketRecords");
                if (nPacketRecords != null)
                    packetRecords = nPacketRecords.InnerText.Length == 0 ? 100 : Convert.ToInt32(nPacketRecords.InnerText);

                XmlNode nActive = nWDS.SelectSingleNode("Active");
                if (nActive != null)
                    active = nActive.InnerText.Length == 0 ? false : Convert.ToBoolean(nActive.InnerText);

                XmlNode nServerModify = nWDS.SelectSingleNode("ServerModify");
                if (nServerModify != null)
                    serverModify = nServerModify.InnerText.Length == 0 ? false : Convert.ToBoolean(nServerModify.InnerText);

                XmlNode nAlwaysClose = nWDS.SelectSingleNode("AlwaysClose");
                if (nAlwaysClose != null)
                    alwaysClose = nAlwaysClose.InnerText.Length == 0 ? false : Convert.ToBoolean(nAlwaysClose.InnerText);

                DataTable tableView = null;
                if(!string.IsNullOrEmpty(comp.WebDataSetID))
                {
                    WebDataSet dataSet = new WebDataSet(true);
                    dataSet.AlwaysClose = alwaysClose;
                    dataSet.RemoteName = remoteName;
                    dataSet.PacketRecords = packetRecords;
                    dataSet.ServerModify = serverModify;
                    dataSet.WhereStr = "1=0";
                    dataSet.Active = true;

                    if (dataSet == null)
                        return null;

                    string viewName = comp.DataMember;
                    if (viewName == null || viewName.Length == 0)
                        return null;

                    tableView = dataSet.RealDataSet.Tables[viewName];
                }
            #if VS90
                else if(!string.IsNullOrEmpty(comp.LinqDataSetID))
                {
                    LinqDataSet dataSet = new LinqDataSet(true);
                    dataSet.AlwaysClose = alwaysClose;
                    dataSet.RemoteName = remoteName;
                    dataSet.PacketRecords = packetRecords;
                    dataSet.ServerModify = serverModify;
                    dataSet.Active = true;

                    if (dataSet == null)
                        return null;

                    string viewName = comp.DataMember;
                    if (viewName == null || viewName.Length == 0)
                        return null;

                    tableView = dataSet.RealDataSet.Tables[viewName];
                }
            #endif

                return tableView;
            }
        }
예제 #16
0
        // ------------------------------------------------------------------------------------------
        public void Reload()
        {
            WebDataSet dataSet = new WebDataSet();

            dataSet.RemoteName = RemoteName;
            dataSet.ServerModify = ServerModify;
            dataSet.WhereStr = WhereStr;
            dataSet.PacketRecords = PacketRecords;
            dataSet.WhereParam = WhereParam;
            dataSet.Active = true;
            int i = -1;
            while ((!dataSet.Eof) && i >= LastIndex)
            {
                dataSet.GetNextPacket();
                i = dataSet.RealDataSet.Tables[0].Rows.Count - 1;
            }

            InnerDataSet.Clear();
            InnerDataSet.Tables[0].ExtendedProperties.Clear();
            InnerDataSet.Merge(dataSet.RealDataSet);
        }
예제 #17
0
    private void CreatDataSet(string[] datasetid)
    {
        int datasetnum = 0;

        foreach (string strdsid in datasetid)
        {
            if (strdsid != string.Empty)
            {
                datasetnum++;
            }
        }
        if (datasetnum > 0)
        {
            refValDateSet = new WebDataSet[datasetnum];
            refValDateSource = new WebDataSource[datasetnum];
            int intcount = 0;

            for (int i = 0; i < datasetid.Length; i++)
            {
                if (datasetid[i] != string.Empty && (!lstDataSetID.Contains(datasetid[i])))
                {
                    #region Create WebDataSet & WebDataSource
                    XmlDocument xmlDoc = new XmlDocument();
                    string resourceName = psyPath + ".vi-VN.resx";
                    ResXResourceReader reader = new ResXResourceReader(resourceName);

                    IDictionaryEnumerator enumerator = reader.GetEnumerator();
                    while (enumerator.MoveNext())
                    {
                        if (enumerator.Key.ToString() == "WebDataSets")
                        {
                            string sXml = (string)enumerator.Value;
                            xmlDoc.LoadXml(sXml);
                            break;
                        }
                    }
                    if (xmlDoc != null)
                    {
                        XmlNode nWDSs = xmlDoc.SelectSingleNode("WebDataSets");
                        if (nWDSs != null)
                        {
                            XmlNode nWDS = nWDSs.SelectSingleNode("WebDataSet[@Name='" + datasetid[i] + "']");
                            if (nWDS != null)
                            {
                                string remoteName = "";
                                int packetRecords = 100;
                                bool active = false;
                                bool serverModify = false;

                                XmlNode nRemoteName = nWDS.SelectSingleNode("RemoteName");
                                if (nRemoteName != null)
                                    remoteName = nRemoteName.InnerText;

                                XmlNode nPacketRecords = nWDS.SelectSingleNode("PacketRecords");
                                if (nPacketRecords != null)
                                    packetRecords = nPacketRecords.InnerText.Length == 0 ? 100 : Convert.ToInt32(nPacketRecords.InnerText);

                                XmlNode nActive = nWDS.SelectSingleNode("Active");
                                if (nActive != null)
                                    active = nActive.InnerText.Length == 0 ? false : Convert.ToBoolean(nActive.InnerText);

                                XmlNode nServerModify = nWDS.SelectSingleNode("ServerModify");
                                if (nServerModify != null)
                                    serverModify = nServerModify.InnerText.Length == 0 ? false : Convert.ToBoolean(nServerModify.InnerText);

                                WebDataSet wds = new WebDataSet();
                                wds.RemoteName = remoteName;
                                wds.PacketRecords = packetRecords;
                                wds.ServerModify = serverModify;
                                wds.Active = true;

                                refValDateSet[intcount] = wds;

                                refValDateSource[intcount] = new WebDataSource();
                                refValDateSource[intcount].DataSource = refValDateSet[intcount];
                                refValDateSource[intcount].DataMember = arrRefValDM[i];
                                refValDateSource[intcount].ID = "refvalds" + intcount.ToString(); ;

                                this.Form.Controls.Add(refValDateSource[intcount]);
                                intcount++;
                                lstDataSetID.Add(datasetid[i]);
                            }
                        }
                    }
                    #endregion
                }
            }
        }
    }
예제 #18
0
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WebManager_WebAgentaspx));
     this.wdsAgent = new Srvtools.WebDataSet();
     this.wdsUsers = new Srvtools.WebDataSet();
     ((System.ComponentModel.ISupportInitialize)(this.wdsAgent)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.wdsUsers)).BeginInit();
     //
     // wdsAgent
     //
     this.wdsAgent.Active = true;
     this.wdsAgent.AlwaysClose = false;
     this.wdsAgent.DeleteIncomplete = true;
     this.wdsAgent.Guid = "1bbca14e-4069-4633-80b8-23ba35eda312";
     this.wdsAgent.LastKeyValues = null;
     this.wdsAgent.Locale = new System.Globalization.CultureInfo("zh-CN");
     this.wdsAgent.PacketRecords = 100;
     this.wdsAgent.Position = -1;
     this.wdsAgent.RemoteName = "GLModule.cmdRoleAgent";
     this.wdsAgent.ServerModify = false;
     //
     // wdsUsers
     //
     this.wdsUsers.Active = true;
     this.wdsUsers.AlwaysClose = false;
     this.wdsUsers.DeleteIncomplete = true;
     this.wdsUsers.Guid = "16355a42-a12f-452f-a30d-77daa26a7d68";
     this.wdsUsers.LastKeyValues = null;
     this.wdsUsers.Locale = new System.Globalization.CultureInfo("zh-CN");
     this.wdsUsers.PacketRecords = 100;
     this.wdsUsers.Position = -1;
     this.wdsUsers.RemoteName = "GLModule.userInfo";
     this.wdsUsers.ServerModify = false;
     ((System.ComponentModel.ISupportInitialize)(this.wdsAgent)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.wdsUsers)).EndInit();
 }
예제 #19
0
        //for design only
        private static WebDataSet CreateWebDataSet(string webDataSetID, string pagePath)
        {
            WebDataSet wds = new WebDataSet(true);
             XmlNode nodeWebDataSet = GetWebDataSetNode(webDataSetID, pagePath);

             if (nodeWebDataSet != null)
             {
                 XmlNode nodeProperty = nodeWebDataSet.SelectSingleNode("RemoteName");
                 if (nodeProperty != null && nodeProperty.InnerText.Length > 0)
                 {
                     wds.RemoteName = nodeProperty.InnerText;
                 }
                 nodeProperty = nodeWebDataSet.SelectSingleNode("PacketRecords");
                 if (nodeProperty != null && nodeProperty.InnerText.Length > 0)
                 {
                     wds.PacketRecords = Convert.ToInt32(nodeProperty.InnerText);
                 }
                 nodeProperty = nodeWebDataSet.SelectSingleNode("ServerModify");
                 if (nodeProperty != null && nodeProperty.InnerText.Length > 0)
                 {
                     wds.ServerModify = Convert.ToBoolean(nodeProperty.InnerText);
                 }
                 wds.WhereStr = "1=0";
                 wds.Active = true;
             }
            return wds;
        }
예제 #20
0
        private void GenDataSet()
        {
            WebDataSet aWebDataSet = new WebDataSet();

            if (aWebDataSet != null)
            {
                aWebDataSet.SetWizardDesignMode(true);
                aWebDataSet.RemoteName = FClientData.ProviderName;
                aWebDataSet.PacketRecords = 100;
                aWebDataSet.Active = true;

                String s;
                s = FClientData.WebSiteName;

                string filePath = System.IO.Path.Combine(s, FClientData.FolderName);
                bool CreateFileSucess = true;
                string fileName = "";
                try
                {
                    fileName = System.IO.Path.Combine(filePath, FClientData.FormTitle + ".xsd");
                    aWebDataSet.RealDataSet.DataSetName = FClientData.FormTitle;
                    aWebDataSet.RealDataSet.WriteXmlSchema(fileName);
                }
                catch
                {
                    CreateFileSucess = false;
                    MessageBox.Show("Failed to create xsd file!");
                }
                finally
                {
                    if (CreateFileSucess && File.Exists(fileName))
                    {
                        FPIFolder.ProjectItems.AddFromFile(fileName);
                    }
                    if (aWebDataSet != null)
                    {
                        aWebDataSet.Dispose();
                    }
                }
            }
        }
예제 #21
0
    private void CreatDataSet(String datasetid)
    {
        wdAnyQuery = new WebDataSet();
        wdsAnyQuery = new WebDataSource();

        if (datasetid != string.Empty && (!lstDataSetID.Contains(datasetid)))
        {
            #region Create WebDataSet & WebDataSource
            XmlDocument xmlDoc = new XmlDocument();
            string resourceName = psyPagePath + ".vi-VN.resx";
            ResXResourceReader reader = new ResXResourceReader(resourceName);

            IDictionaryEnumerator enumerator = reader.GetEnumerator();
            while (enumerator.MoveNext())
            {
                if (enumerator.Key.ToString() == "WebDataSets")
                {
                    string sXml = (string)enumerator.Value;
                    xmlDoc.LoadXml(sXml);
                    break;
                }
            }
            if (xmlDoc != null)
            {
                XmlNode nWDSs = xmlDoc.SelectSingleNode("WebDataSets");
                if (nWDSs != null)
                {
                    XmlNode nWDS = nWDSs.SelectSingleNode("WebDataSet[@Name='" + datasetid + "']");
                    if (nWDS != null)
                    {
                        string remoteName = "";
                        int packetRecords = 100;
                        bool active = false;
                        bool serverModify = false;

                        XmlNode nRemoteName = nWDS.SelectSingleNode("RemoteName");
                        if (nRemoteName != null)
                            remoteName = nRemoteName.InnerText;

                        XmlNode nPacketRecords = nWDS.SelectSingleNode("PacketRecords");
                        if (nPacketRecords != null)
                            packetRecords = nPacketRecords.InnerText.Length == 0 ? 100 : Convert.ToInt32(nPacketRecords.InnerText);

                        XmlNode nActive = nWDS.SelectSingleNode("Active");
                        if (nActive != null)
                            active = nActive.InnerText.Length == 0 ? false : Convert.ToBoolean(nActive.InnerText);

                        XmlNode nServerModify = nWDS.SelectSingleNode("ServerModify");
                        if (nServerModify != null)
                            serverModify = nServerModify.InnerText.Length == 0 ? false : Convert.ToBoolean(nServerModify.InnerText);

                        wdAnyQuery.RemoteName = remoteName;
                        wdAnyQuery.PacketRecords = packetRecords;
                        wdAnyQuery.ServerModify = serverModify;
                        wdAnyQuery.Active = true;

                        wdsAnyQuery = new WebDataSource();
                        wdsAnyQuery.ID = "webanyqueryds";
                        wdsAnyQuery.DesignDataSet = wdAnyQuery.RealDataSet;
                        wdsAnyQuery.DataMember = dataMember;

                        this.Form.Controls.Add(wdsAnyQuery);
                        //lstDataSetID.Add(datasetid);
                    }
                }
            }
            #endregion
        }
    }
예제 #22
0
    private void CreatDataSet(object datasetid)
    {
        XmlDocument xmlDoc = new XmlDocument();
        string resourceName = psyPath + ".vi-VN.resx";
        ResXResourceReader reader = new ResXResourceReader(resourceName);
        IDictionaryEnumerator enumerator = reader.GetEnumerator();
        while (enumerator.MoveNext())
        {
            if (enumerator.Key.ToString() == "WebDataSets")
            {
                string sXml = (string)enumerator.Value;
                xmlDoc.LoadXml(sXml);
                break;
            }
        }
        if (xmlDoc != null)
        {
            XmlNode nWDSs = xmlDoc.SelectSingleNode("WebDataSets");
            if (nWDSs != null)
            {
                XmlNode nWDS = nWDSs.SelectSingleNode("WebDataSet[@Name='" + datasetid + "']");
                if (nWDS != null)
                {
                    string remoteName = "";
                    int packetRecords = 100;
                    bool active = false;
                    bool serverModify = false;

                    XmlNode nRemoteName = nWDS.SelectSingleNode("RemoteName");
                    if (nRemoteName != null)
                        remoteName = nRemoteName.InnerText;

                    XmlNode nPacketRecords = nWDS.SelectSingleNode("PacketRecords");
                    if (nPacketRecords != null)
                        packetRecords = nPacketRecords.InnerText.Length == 0 ? 100 : Convert.ToInt32(nPacketRecords.InnerText);

                    XmlNode nActive = nWDS.SelectSingleNode("Active");
                    if (nActive != null)
                        active = nActive.InnerText.Length == 0 ? false : Convert.ToBoolean(nActive.InnerText);

                    XmlNode nServerModify = nWDS.SelectSingleNode("ServerModify");
                    if (nServerModify != null)
                        serverModify = nServerModify.InnerText.Length == 0 ? false : Convert.ToBoolean(nServerModify.InnerText);

                    WebDataSet wds = new WebDataSet();
                    wds.RemoteName = remoteName;
                    wds.PacketRecords = packetRecords;
                    wds.ServerModify = serverModify;
                    wds.Active = true;

                    wdsDay = wds;
                    if (strWhere != string.Empty)
                    {
                        wdsDay.SetWhere(strWhere);
                    }

                }
            }
        }
    }
예제 #23
0
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WebAccessGroup));
     this.WUser = new Srvtools.WebDataSet();
     this.WGroup = new Srvtools.WebDataSet();
     ((System.ComponentModel.ISupportInitialize)(this.WUser)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.WGroup)).BeginInit();
     //
     // WUser
     //
     this.WUser.Active = true;
     this.WUser.AlwaysClose = false;
     this.WUser.Guid = "ef1c5b54-852e-40fc-84d5-c6e1d0497c57";
     this.WUser.LastKeyValues = null;
     this.WUser.PacketRecords = 100;
     this.WUser.Position = -1;
     this.WUser.RemoteName = "GLModule.userInfo";
     this.WUser.ServerModify = false;
     this.WUser.WhereStr = "";
     //
     // WGroup
     //
     this.WGroup.Active = true;
     this.WGroup.AlwaysClose = false;
     this.WGroup.Guid = "99cdf311-ab3f-43af-b0b7-443241a6dccf";
     this.WGroup.LastKeyValues = null;
     this.WGroup.PacketRecords = 100;
     this.WGroup.Position = -1;
     this.WGroup.RemoteName = "GLModule.sqlMGroups";
     this.WGroup.ServerModify = false;
     this.WGroup.WhereStr = "";
     ((System.ComponentModel.ISupportInitialize)(this.WUser)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.WGroup)).EndInit();
 }
예제 #24
0
파일: GloFix.cs 프로젝트: san90279/UK_OAS
        public static WebDataSet CreateDataSet(string WebDataSetID)
        {
            WebDataSet wds = new WebDataSet(true);
            XmlDocument xmlDoc = new XmlDocument();
            CultureInfo culture = new CultureInfo("vi-VN");
            string aspxName = EditionDifference.ActiveDocumentFullName();
            string resourceName = aspxName + @".vi-VN.resx";
            ResXResourceReader reader = new ResXResourceReader(resourceName);
            IDictionaryEnumerator enumerator = reader.GetEnumerator();
            while (enumerator.MoveNext())
            {
                if (enumerator.Key.ToString() == "WebDataSets")
                {
                    string sXml = (string)enumerator.Value;
                    xmlDoc.LoadXml(sXml);
                    break;
                }
            }
            if (xmlDoc != null)
            {
                XmlNode nWDSs = xmlDoc.SelectSingleNode("WebDataSets");
                if (nWDSs != null)
                {
                    string webDataSetID = WebDataSetID;
                    XmlNode nWDS = nWDSs.SelectSingleNode("WebDataSet[@Name='" + webDataSetID + "']");
                    if (nWDS != null)
                    {
                        string remoteName = "";
                        int packetRecords = 100;
                        bool active = false;
                        bool serverModify = false;

                        XmlNode nRemoteName = nWDS.SelectSingleNode("RemoteName");
                        if (nRemoteName != null)
                            remoteName = nRemoteName.InnerText;

                        XmlNode nPacketRecords = nWDS.SelectSingleNode("PacketRecords");
                        if (nPacketRecords != null)
                            packetRecords = nPacketRecords.InnerText.Length == 0 ? 100 : Convert.ToInt32(nPacketRecords.InnerText);

                        XmlNode nActive = nWDS.SelectSingleNode("Active");
                        if (nActive != null)
                            active = nActive.InnerText.Length == 0 ? false : Convert.ToBoolean(nActive.InnerText);

                        XmlNode nServerModify = nWDS.SelectSingleNode("ServerModify");
                        if (nServerModify != null)
                            serverModify = nServerModify.InnerText.Length == 0 ? false : Convert.ToBoolean(nServerModify.InnerText);
                        wds.RemoteName = remoteName;
                        wds.PacketRecords = packetRecords;
                        wds.ServerModify = serverModify;
                        wds.Active = true;
                    }
                }
            }
            return wds;
        }
예제 #25
0
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(InnerPages_WebUControl));
     this.WUser = new Srvtools.WebDataSet();
     ((System.ComponentModel.ISupportInitialize)(this.WUser)).BeginInit();
     //
     // WUser
     //
     this.WUser.Active = true;
     this.WUser.AlwaysClose = false;
     this.WUser.DeleteIncomplete = true;
     this.WUser.Guid = "10684bb2-5e9c-4385-9b1f-e9c71d4c5b4b";
     this.WUser.LastKeyValues = null;
     this.WUser.PacketRecords = 100;
     this.WUser.Position = -1;
     this.WUser.RemoteName = "GLModule.userInfo";
     this.WUser.ServerModify = false;
     ((System.ComponentModel.ISupportInitialize)(this.WUser)).EndInit();
 }
예제 #26
0
        public bool ApplyUpdates()
        {
            WebDataSet dataSet = new WebDataSet();
            dataSet.RemoteName = RemoteName;
            dataSet.ServerModify = ServerModify;

            dataSet.RealDataSet = InnerDataSet;

            //add by ccm do AutoSeq
            List<WebAutoSeq> wAutoSeq = new List<WebAutoSeq>();
            foreach (Control ctrl in this.Page.Form.Controls)
            {

                if (ctrl is WebAutoSeq && ((WebAutoSeq)ctrl).MasterDataSourceID == this.ID && ((WebAutoSeq)ctrl).ReNumber && ((WebAutoSeq)ctrl).Active)
                {
                    wAutoSeq.Add((WebAutoSeq)ctrl);
                }
            }
            if (wAutoSeq.Count > 0)
            {
                foreach (WebAutoSeq was in wAutoSeq)
                {
                    was.ResetDetail();
                }

            }
            //End AutoSeq

            // End Add 2006/08/22
            dataSet.ApplyError += delegate(object sender, ApplyErrorEventArgs e)
            {
                OnApplyError(e);
            };
            bool b = dataSet.ApplyUpdates();
            if (!b)
                return false;
            else
            {
                this.RemoveLock();
                InnerDataSet = dataSet.RealDataSet;
                if (wAutoSeq.Count > 0)
                {
                    foreach (WebAutoSeq was in wAutoSeq)
                    {
                        foreach (Control ctrl in this.Page.Form.Controls)
                        {
                            if (ctrl is WebGridView && ((WebGridView)ctrl).DataSourceID == was.DataSourceID)
                            {
                                ((WebGridView)ctrl).DataBind();
                            }
                        }
                    }
                }
                return true;
            }
        }
예제 #27
0
        public void DeleteItem()
        {
            TreeNode nodedelete = this.SelectedNode;
            if (nodedelete != null)
            {
                if (nodedelete.ChildNodes.Count > 0)
                {
                    this.Page.Response.Write("<script>window.alert('delete the childnode first!')</script>");
                }
                else
                {
                    WebDataSource ds = (WebDataSource)GetObjByID(this.WebDataSourceID);

                    DataSet dataset = ds.InnerDataSet;
                    WebDataSet wds = new WebDataSet();
                    wds.RemoteName = ds.RemoteName;
                    wds.RealDataSet = dataset;

                    DataTable dt = wds.RealDataSet.Tables[ds.DataMember];

                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        if (dt.Rows[i][this.KeyField].ToString() == nodedelete.Value)
                        {
                            dt.Rows[i].Delete();
                        }
                    }
                    wds.ApplyUpdates();
                    this.Page.Response.Redirect(this.Page.Request.Path);
                }
            }
        }
예제 #28
0
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WebManager_WebOrganization));
     this.wOrgRoles = new Srvtools.WebDataSet();
     this.wOrgLevel = new Srvtools.WebDataSet();
     this.wOrgKind = new Srvtools.WebDataSet();
     this.wGroup = new Srvtools.WebDataSet();
     ((System.ComponentModel.ISupportInitialize)(this.wOrgRoles)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.wOrgLevel)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.wOrgKind)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.wGroup)).BeginInit();
     //
     // wOrgRoles
     //
     this.wOrgRoles.Active = true;
     this.wOrgRoles.AlwaysClose = true;
     this.wOrgRoles.DeleteIncomplete = true;
     this.wOrgRoles.Guid = "eab74ca2-6eba-4bc6-bb24-d64cd24303dc";
     this.wOrgRoles.LastKeyValues = null;
     this.wOrgRoles.Locale = new System.Globalization.CultureInfo("zh-CN");
     this.wOrgRoles.PacketRecords = 100;
     this.wOrgRoles.Position = -1;
     this.wOrgRoles.RemoteName = "GLModule.cmdOrgRoles";
     this.wOrgRoles.ServerModify = false;
     //
     // wOrgLevel
     //
     this.wOrgLevel.Active = true;
     this.wOrgLevel.AlwaysClose = false;
     this.wOrgLevel.DeleteIncomplete = true;
     this.wOrgLevel.Guid = "018297d2-4e4c-4a5f-adfd-6d59c3ca41d2";
     this.wOrgLevel.LastKeyValues = null;
     this.wOrgLevel.Locale = new System.Globalization.CultureInfo("zh-CN");
     this.wOrgLevel.PacketRecords = 100;
     this.wOrgLevel.Position = -1;
     this.wOrgLevel.RemoteName = "GLModule.cmdOrgLevel";
     this.wOrgLevel.ServerModify = false;
     //
     // wOrgKind
     //
     this.wOrgKind.Active = true;
     this.wOrgKind.AlwaysClose = false;
     this.wOrgKind.DeleteIncomplete = true;
     this.wOrgKind.Guid = "669b01fa-ee5b-4b6a-b267-fed3ea68cbe4";
     this.wOrgKind.LastKeyValues = null;
     this.wOrgKind.Locale = new System.Globalization.CultureInfo("zh-CN");
     this.wOrgKind.PacketRecords = 100;
     this.wOrgKind.Position = -1;
     this.wOrgKind.RemoteName = "GLModule.cmdOrgKind";
     this.wOrgKind.ServerModify = false;
     //
     // wGroup
     //
     this.wGroup.Active = true;
     this.wGroup.AlwaysClose = false;
     this.wGroup.DeleteIncomplete = true;
     this.wGroup.Guid = "587f0d0d-e292-49e7-b210-151df6fdd05a";
     this.wGroup.LastKeyValues = null;
     this.wGroup.Locale = new System.Globalization.CultureInfo("zh-CN");
     this.wGroup.PacketRecords = 100;
     this.wGroup.Position = -1;
     this.wGroup.RemoteName = "GLModule.groupInfo";
     this.wGroup.ServerModify = false;
     ((System.ComponentModel.ISupportInitialize)(this.wOrgRoles)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.wOrgLevel)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.wOrgKind)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.wGroup)).EndInit();
 }