Exemple #1
0
        private void EditBtn_Click(object sender, EventArgs e)
        {
            EditBtn.Hide();
            SaveBtn.Show();

            NameTB.ReadOnly     = false;
            SurnameTB.ReadOnly  = false;
            AddressTB.ReadOnly  = false;
            BirthdayTB.ReadOnly = false;
            PhoneTB.ReadOnly    = false;
            EmailTB.ReadOnly    = false;
        }
        private void btn_addPro_Click(object sender, EventArgs e)
        {
            AddProPanel.Show();
            EditBtn.Hide();
            Btn_SaveProduct.Show();

            Txt_ProductNameUp.Text                  = "";
            numericDiscountProUp.Text               = "";
            numericIncomingPriceProUp.Text          = "";
            numericIndvidualPriceProUp.Text         = "";
            numericQuantityProUp.Text               = "";
            numericQuantityPackageProUp.Text        = "";
            Como_productCategoryUpdate.SelectedText = "";
            Como_productBuySupplierUp.SelectedText  = "";
            Como_productUnitUpdate.SelectedText     = "";
        }
Exemple #3
0
        public void ShowCmdWindow(string cmd, int LscId, string LscName, string LscIP, int LscPort, string LscUID, string LscPwd, int BeatInterval, int BeatDelay, string DBServer, int DBPort, string DBName, string DBUID, string DBPwd, string HisDBServer, int HisDBPort, string HisDBName, string HisDBUID, string HisDBPwd, bool Enabled)
        {
            switch (cmd)
            {
            case "Edit":
                LSCWindow.Icon      = Icon.ChartOrganisation;
                LSCWindow.Title     = "编辑信息";
                LSCIDField.Disabled = true;
                LSCStatusBar.ClearStatus();
                SaveBtn.Hide();
                EditBtn.Show();
                LSCIDField.Number        = LscId;
                LSCNameField.Text        = LscName;
                LSCIPField.Text          = LscIP;
                LSCPortField.Number      = LscPort;
                LSCUIDField.Text         = LscUID;
                LSCPwdField.Text         = LscPwd;
                BeatIntervalField.Number = BeatInterval;
                BeatDelayField.Number    = BeatDelay;
                DBIPField.Text           = DBServer;
                DBPortField.Number       = DBPort;
                DBNameField.Text         = DBName;
                DBUIDField.Text          = DBUID;
                DBPwdField.Text          = DBPwd;
                HisDBIPField.Text        = HisDBServer;
                HisDBPortField.Number    = HisDBPort;
                HisDBNameField.Text      = HisDBName;
                HisDBUIDField.Text       = HisDBUID;
                HisDBPwdField.Text       = HisDBPwd;
                EnabledCheckbox.Checked  = Enabled;
                LSCWindow.Show();
                break;

            case "Del":
                X.Msg.Confirm("确认对话框", "本操作将删除与Lsc有关的所有数据!您确定要删除吗?", new MessageBoxButtonsConfig {
                    Yes = new MessageBoxButtonConfig {
                        Handler = String.Format(@"
                            X.LSCManager.DelLsc({0},{{
                            success: function(result) {{
                                LSCPagingToolbar.doRefresh();
                            }},
                            eventMask: {{
                                showMask: true,
                                target: 'customtarget',
                                msg: '正在删除中...',
                                customTarget: LSCPanel.body.up('div')
                            }}}});", LscId),
                        Text    = "确定"
                    },
                    No = new MessageBoxButtonConfig {
                        Text = "取消"
                    }
                }).Show();
                break;

            case "Add":
                LSCWindow.Icon          = Icon.ChartOrganisationAdd;
                LSCWindow.Title         = "新增信息";
                EnabledCheckbox.Checked = false;
                LSCIDField.Disabled     = false;
                LSCStatusBar.ClearStatus();
                SaveBtn.Show();
                EditBtn.Hide();
                LSCIDField.Clear();
                LSCNameField.Clear();
                LSCIPField.Clear();
                LSCPortField.Number = LscPort;
                LSCUIDField.Clear();
                LSCPwdField.Clear();
                BeatIntervalField.Number = BeatInterval;
                BeatDelayField.Number    = BeatDelay;
                DBIPField.Clear();
                DBPortField.Number = DBPort;
                DBNameField.Clear();
                DBUIDField.Clear();
                DBPwdField.Clear();
                HisDBIPField.Clear();
                HisDBPortField.Number = HisDBPort;
                HisDBNameField.Clear();
                HisDBUIDField.Clear();
                HisDBPwdField.Clear();
                EnabledCheckbox.Checked = Enabled;
                LSCWindow.Show();
                break;

            case "Sync":
                SyncWindow.Icon   = Icon.DatabaseRefresh;
                SyncWindow.Title  = String.Format("数据同步[{0}]", LscName);
                STRadio.Checked   = true;
                SyncWindowHF.Text = LscId.ToString();
                SyncWindow.Show();
                break;

            default:
                break;
            }
        }