Beispiel #1
0
        /// <summary>
        /// 显示修改窗体
        /// </summary>
        private void AddWindowModify()
        {
            try
            {
                RowSelectionModel sm = this.GridUser.SelectionModel.Primary as RowSelectionModel;
                if (sm.SelectedRow != null)
                {
                    Window window = new Window();
                    window.ID            = "UserModify";
                    window.Title         = GetLangStr("TGSUserManager43", "密码修改");
                    window.Width         = Unit.Pixel(400);
                    window.Height        = Unit.Pixel(240);
                    window.Modal         = true;
                    window.Maximizable   = false;
                    window.Resizable     = false;
                    window.Hidden        = true;
                    window.AutoLoad.Mode = LoadMode.Merge;
                    window.Layout        = "FitLayout";

                    Ext.Net.FormPanel tab = new Ext.Net.FormPanel();
                    tab.MonitorValid = true;
                    tab.Title        = "";
                    tab.Padding      = 20;
                    tab.Height       = 120;
                    tab.Items.Add(CommonExt.AddTextFieldPassword("txtMFirstPassWord", GetLangStr("TGSUserManager44", "初始密码"), false));
                    tab.Items.Add(CommonExt.AddTextFieldPassword("txtMPassWord", GetLangStr("TGSUserManager45", "新密码"), false));
                    tab.Items.Add(CommonExt.AddTextFieldPassword_Confirm("txtMConfirmPassWord", GetLangStr("TGSUserManager46", "重复密码"), false, "txtMPassWord"));

                    tab.Buttons.Add(CommonExt.AddButton("butSaveEdit2", GetLangStr("TGSUserManager47", "保存"), "Disk", "UserManager.UpdateData()"));
                    tab.Buttons.Add(CommonExt.AddButton("butCancelEdit2", GetLangStr("TGSUserManager48", "取消"), "Cancel", window.ClientID + ".hide()"));
                    tab.Listeners.ClientValidation.Handler = "butSaveEdit2.setDisabled(!valid);";

                    window.Items.Add(tab);
                    window.Render(this.Form);
                    window.Show();
                }
                else
                {
                    Notice(GetLangStr("TGSUserManager42", "提示信息"), GetLangStr("TGSUserManager50", "请选择要修改的用户"));
                }
            }
            catch (Exception ex)
            {
                ILog.WriteErrorLog(ex);
                logManager.InsertLogError("TGSUserManager.aspx-AddWindowModify", ex.Message + ";" + ex.StackTrace, "AddWindowModify has an exception");
            }
        }
        /// <summary>
        /// 显示修改窗体
        /// </summary>
        private void AddWindowModify()
        {
            Window window = new Window();

            window.ID            = "UserModify";
            window.Title         = "密码修改";
            window.Width         = Unit.Pixel(400);
            window.Height        = Unit.Pixel(200);
            window.Modal         = true;
            window.Collapsible   = true;
            window.Maximizable   = false;
            window.Resizable     = false;
            window.Hidden        = true;
            window.AutoLoad.Mode = LoadMode.Merge;

            Ext.Net.Panel tabs = new Ext.Net.Panel();
            tabs.ID     = "TabPanel1";
            tabs.IDMode = IDMode.Explicit;
            tabs.Border = false;

            Ext.Net.Panel tab = new Ext.Net.Panel();
            tab.Title   = "";
            tab.Padding = 5;
            tab.Height  = 120;
            tabs.Add(tab);
            tab.Items.Add(CommonExt.AddTextFieldPassword("txtMFirstPassWord", "初始密码", false));
            tab.Items.Add(CommonExt.AddTextFieldPassword("txtMPassWord", "新密码", false));
            tab.Items.Add(CommonExt.AddTextFieldPassword_Confirm("txtMConfirmPassWord", "重复密码", false, "txtMPassWord"));

            Toolbar     toolbar     = new Ext.Net.Toolbar();
            ToolbarFill toolbarFill = new ToolbarFill();

            toolbar.Add(toolbarFill);
            window.BottomBar.Add(toolbar);
            CommonExt.AddButton(toolbar, "butSaveEdit2", "保存", "Disk", "UserManager.UpdateData()");
            CommonExt.AddButton(toolbar, "butCancelEdit2", "取消", "Cancel", window.ClientID + ".hide()");
            window.Items.Add(tabs);
            window.Render(this.Form);
            window.Show();
        }
Beispiel #3
0
        /// <summary>
        /// 显示注册窗体
        /// </summary>
        private void AddWindow()
        {
            Window window = new Window();

            window.ID            = "UserAdd";
            window.Title         = GetLangStr("TGSUserManager51", "用户注册");
            window.Width         = Unit.Pixel(400);
            window.Height        = Unit.Pixel(260);
            window.Modal         = true;
            window.Maximizable   = false;
            window.Resizable     = false;
            window.Hidden        = true;
            window.AutoLoad.Mode = LoadMode.Merge;
            window.Layout        = "FitLayout";

            Ext.Net.FormPanel tab = new Ext.Net.FormPanel();
            tab.MonitorValid = true;
            tab.Padding      = 20;
            tab.Height       = 220;
            TextField txtUserId = CommonExt.AddTextField("txtAUserID", GetLangStr("TGSUserManager52", "用户编号"));

            txtUserId.Text     = tgsPproperty.GetMinRecordId();
            txtUserId.Disabled = true;
            tab.Items.Add(txtUserId);
            TextField txtUserName = CommonExt.AddTextField("txtAUserName", GetLangStr("TGSUserManager53", "用户名"), false, "");

            txtUserName.Width = Unit.Pixel(300);
            tab.Items.Add(txtUserName);
            tab.Items.Add(CommonExt.AddTextFieldPassword("txtAPassWord", GetLangStr("TGSUserManager54", "密码"), false));
            tab.Items.Add(CommonExt.AddTextFieldPassword_Confirm("txtAConfirmPassWord", GetLangStr("TGSUserManager46", "重复密码"), false, "txtAPassWord"));
            tab.Buttons.Add(CommonExt.AddButton("butSaveEdit", GetLangStr("TGSUserManager56", "保存"), "Disk", "UserManager.InfoSave()"));
            tab.Buttons.Add(CommonExt.AddButton("butCancelEdit", GetLangStr("TGSUserManager57", "取消"), "Cancel", window.ClientID + ".hide()"));
            tab.Listeners.ClientValidation.Handler = "butSaveEdit.setDisabled(!valid);";
            window.Items.Add(tab);
            window.Render(this.Form);
            window.Show();
        }