示例#1
0
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            try
            {
                if (txtUserId.Text.Trim().Length == 0)
                {
                    CmnFunction.ShowMsgBox("User ID : " + RptMessages.GetMessage("STD999", GlobalVariable.gcLanguage));
                }
                if (txtPassword.Text.Trim().Length == 0)
                {
                    CmnFunction.ShowMsgBox("Password : "******"STD999", GlobalVariable.gcLanguage));
                }
                if (cdvSecGrpId.Text.Trim().Length == 0)
                {
                    CmnFunction.ShowMsgBox("Secutiry Group : " + RptMessages.GetMessage("STD999", GlobalVariable.gcLanguage));
                }
                if (CmnFunction.ShowMsgBox(RptMessages.GetMessage("INF003", GlobalVariable.gcLanguage), "Update", MessageBoxButtons.YesNo, 2) != System.Windows.Forms.DialogResult.Yes)
                {
                    return;
                }
                if (Update_Security_User(txtUserId.Text.Trim()) == true)
                {
                    CmnFunction.ShowMsgBox(RptMessages.GetMessage("INF001", GlobalVariable.gcLanguage));

                    CmnInitFunction.FieldClear(this, null, false);
                    CmnListFunction.ViewSecUserList(lisUser);
                }
            }
            catch (Exception ex)
            {
                CmnFunction.ShowMsgBox("SEC1101.btnUpdate_Click() : " + ex.ToString());
            }
        }
示例#2
0
文件: SEC1103.cs 项目: trantan490/web
        private void btnDelete_Click(object sender, EventArgs e)
        {
            try
            {
                if (txtFunc.Text.Trim().Length == 0)
                {
                    CmnFunction.ShowMsgBox("Function Name : " + RptMessages.GetMessage("STD999", GlobalVariable.gcLanguage));
                }
                if (CmnFunction.ShowMsgBox(RptMessages.GetMessage("INF002", GlobalVariable.gcLanguage), "Delete", MessageBoxButtons.YesNo, 2) != System.Windows.Forms.DialogResult.Yes)
                {
                    return;
                }
                if (Delete_Function(txtFunc.Text.Trim()) == true)
                {
                    CmnFunction.ShowMsgBox(RptMessages.GetMessage("INF001", GlobalVariable.gcLanguage));

                    CmnInitFunction.FieldClear(this, null, false);
                    lisFunc.SelectedIndices.Clear();
                    lisFunc.Items.Clear();
                    ViewFunctionList(lisFunc);
                    //lisFunc.Items.Remove(lisFunc.SelectedItems[0]);
                }
            }
            catch (Exception ex)
            {
                CmnFunction.ShowMsgBox("SEC1103.btnDelete_Click() : " + ex.Message);
            }
        }
示例#3
0
文件: SEC1102.cs 项目: trantan490/web
        private void btnDelete_Click(object sender, EventArgs e)
        {
            try
            {
                if (txtSecGrp.Text.Trim().Length == 0)
                {
                    CmnFunction.ShowMsgBox("Security Group : " + RptMessages.GetMessage("STD999", GlobalVariable.gcLanguage));
                }
                if (CmnFunction.ShowMsgBox(RptMessages.GetMessage("INF002", GlobalVariable.gcLanguage), "Delete", MessageBoxButtons.YesNo, 2) != System.Windows.Forms.DialogResult.Yes)
                {
                    return;
                }
                if (Delete_Security_Group(txtSecGrp.Text.Trim()) == true)
                {
                    CmnFunction.ShowMsgBox(RptMessages.GetMessage("INF001", GlobalVariable.gcLanguage));

                    CmnInitFunction.FieldClear(this, null, false);
                    lisSecGrp.Items.Remove(lisSecGrp.SelectedItems[0]);
                }
            }
            catch (Exception ex)
            {
                CmnFunction.ShowMsgBox("SEC1102.btnDelete_Click() : " + ex.ToString());
            }
        }