Esempio n. 1
0
 private void ultraToolbarsManager3_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
 {
     switch (e.Tool.Key.ToString())
     {
     case "Query":
     {
         DateTime begintime = this.dtTimeBegin.Value;
         DateTime endtime   = this.dtTimeEnd.Value;
         if (begintime > endtime)
         {
             MessageBox.Show("截止日期不能小于开始日期!");
             return;
         }
         String begintime_str = begintime.ToString("yyyy-MM-dd 00:00:00");
         String endtime_str   = endtime.ToString("yyyy-MM-dd 23:59:59");
         //String strSelectSql = "select t.fs_enterfacno as 进厂流水号,t.fs_plancode as 预报编号,t.fs_cardnumber 卡号,t.fs_carno 车号,t.fd_enterfactime,t.fs_enterfacplace,t.fs_enterfacchecker,";
         //strSelectSql+="t.fs_enterfacremark,t.fd_exitfactime,t.fs_exitfacplace,t.fs_exitfacchecker,t.fs_exitfacremark from dt_enterfacrecord t ";
         string strSelectSql = " SELECT FS_ENTERFACNO,FS_CARDNUMBER,FS_CARNO ,FS_PLANCODE ,to_char(FD_ENTERFACTIME,'YYYY-MM-DD HH24:MI:SS') FD_ENTERFACTIME,FS_ENTERFACPLACE ,FS_ENTERFACCHECKER ,to_char(FD_EXITFACTIME,'YYYY-MM-DD HH24:MI:SS') FD_EXITFACTIME ,FS_EXITFACPLACE,FS_EXITFACCHECKER,FS_ENTERFACREMARK,FS_EXITFACREMARK FROM DT_ENTERFACRECORD t ";
         strSelectSql += "where t.fd_enterfactime >=TO_DATE('" + begintime_str + "','YYYY-MM-DD HH24:MI:SS') and t.fd_exitfactime<=TO_DATE('" + endtime_str + "','YYYY-MM-DD HH24:MI:SS') ";
         strSelectSql += "or (t.fd_enterfactime >=TO_DATE('" + begintime_str + "','YYYY-MM-DD HH24:MI:SS') and fn_enterfacflag=1)";
         strSelectSql += " and FS_CARNO='" + txtCarNo.Text.Replace("'", "''") + "'";
         CoreClientParam selectccp = new CoreClientParam();
         selectccp.ServerName   = "ygjzjl.carcard";
         selectccp.MethodName   = "queryByClientSql";
         selectccp.ServerParams = new object[] { strSelectSql };
         dataSet1.Tables["车辆入出厂信息"].Clear();
         selectccp.SourceDataTable = dataSet1.Tables["车辆入出厂信息"];
         this.ExecuteQueryToDataTable(selectccp, CoreInvokeType.Internal);
         break;
     }
     }
 }
Esempio n. 2
0
        private void mainToolbarsManager_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
        {
            switch (e.Tool.Key)
            {
            case "AddStudentButton":
                var newStudentForm = new NewStudentForm();
                newStudentForm.StartPosition = FormStartPosition.CenterParent;
                newStudentForm.ShowDialog();
                break;

            case "Show Students":
                var testMdiChildForm = new NewStudentForm();
                testMdiChildForm.MdiParent = this;
                testMdiChildForm.Dock      = DockStyle.Fill;
                testMdiChildForm.Show();
                break;

            case "MainMenuExitButton":
                Close();
                break;

            case "Show George Account":
                var georgeAccountForm = new GeorgeAccountForm();
                georgeAccountForm.Dock = DockStyle.Fill;
                georgeAccountForm.Show();
                break;
            }
        }
        private void Toolbar_Application_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
        {
            try
            {
                switch (e.Tool.Key)
                {
                case "BTN_Users":
                case "BTN_Books":
                    this.IsMdiContainer = true;
                    FRM_Students Form2 = new FRM_Students();
                    Form2.MdiParent = this;
                    Form2.Show();
                    break;

                case "BTN_Students":
                    this.IsMdiContainer = true;
                    Form1 Form = new Form1();
                    Form.MdiParent = this;
                    Form.Show();
                    break;

                case "BTN_Reports":
                    break;
                }
            }

            catch (Exception ex)
            {
                ExceptionHandler.HandleException(ex.Message, this.Name, "Toolbar_Application_ToolClick");
            }
        }
        private void Utm_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
        {
            var grid = GetActiveGrid();

            if (grid == null)
            {
                return;
            }

            try
            {
                switch (e.Tool.Key)
                {
                case "Export to Excel":
                    grid.ExportToExcel();
                    break;

                case "CopyText":
                    grid.PerformAction(UltraGridAction.Copy);
                    break;
                }
            }
            catch (Exception ex)
            {
                _log.Error("Error performing action.");
                _log.Error(ex.Message, ex);
                Dialog.ShowErrorDialog(Application.ProductName, "Error occurred.", ex.Message, ex.StackTrace);
            }
        }
Esempio n. 5
0
        private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
        {
            if (e.Tool.Key == "查询")
            {
                QueryBCWeightMainData();
            }

            if (e.Tool.Key == "修改")
            {
                UpdateSteelWeightMain();
            }
            if (e.Tool.Key == "补录")
            {
                DoHandSaveMainForGP();
            }
            if (e.Tool.Key == "删除")
            {
                DeleteSteelWeightMain();
            }

            if (e.Tool.Key == "修改从表")
            {
                UpdateSteelWeightDetail();
            }
            if (e.Tool.Key == "补录从表")
            {
                //DoHandSaveForGP();
            }
            if (e.Tool.Key == "删除从表")
            {
                DeleteSteelWeightDetail();
            }
        }
Esempio n. 6
0
 private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
 {
     if (e.Tool.Key == "Query")
     {
         DoQuery();
     }
 }
Esempio n. 7
0
        private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
        {
            switch (e.Tool.Key)
            {
            case "Query":
            {
                this.GetBCtheoryWeightInfo();
                break;
            }

            case "Add":
            {
                this.Add();
                break;
            }

            case "Update":
            {
                this.Update();
                break;
            }

            case "Delete":
            {
                this.Delete();
                break;
            }
            }
        }
Esempio n. 8
0
        private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
        {
            switch (e.Tool.Key)
            {
            case "查询":
                Query();
                break;

            case "导出":
                if (this.saveFileDialog1.ShowDialog(this) == DialogResult.OK)
                {
                    Export(saveFileDialog1.FileName, true);
                }
                break;

            case "打印":
                if (cbPrint.SelectedIndex < 0)
                {
                    MessageBox.Show("请选择打印机!");
                    return;
                }
                string path = System.Environment.CurrentDirectory + "\\temp\\tmp.xls";
                //Export(path, false);
                if (Export(path, false))
                {
                    Print(path);
                }
                break;
            }
        }
Esempio n. 9
0
        private void Toolbar_Options_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
        {
            try
            {
                Object vFRM_Active = this.ActiveMdiChild;
                if (vFRM_Active != null)
                {
                    switch (e.Tool.Key)
                    {
                    case "BTN_Exit":
                        Application.Exit();
                        break;

                    case "BTN_Delete":
                        ((ICommon)this.ActiveMdiChild).Delete();
                        break;

                    case "BTN_New":
                        ((ICommon)this.ActiveMdiChild).sNew();
                        break;

                    case "BTN_Save":
                        ((ICommon)this.ActiveMdiChild).sSave();
                        break;
                    }
                }
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(ex.Message, this.Name, "Toolbar_Options_ToolClick");
            }
        }
Esempio n. 10
0
        private void uToolBar_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
        {
            switch (e.Tool.Key.ToString())
            {
            case "find":
            {
                if (!getStrWhere())
                {
                    break;
                }
                showGridInfo();
                break;
            }

            case "Reload":
            {
                unLoadData();
                break;
            }

            case "ToExcel":
            {
                Constant.ExportGrid2Excel(this, this.ultraGridExcelExporter1, uGridData);
                if (Constant.WaitingForm != null)
                {
                    Constant.WaitingForm.Close();
                }
                break;
            }
            }
        }
Esempio n. 11
0
        private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
        {
            switch (e.Tool.Key)
            {
            case "btn_Add":        // ButtonTool
                //Add();
                try
                {
                    AddHoaDonTra frm = new AddHoaDonTra();
                    frm.ShowDialog();
                }
                catch { }
                HienThiDSHoaDon();
                break;

            case "btn_Save":        // ButtonTool
                flxMatHang.Focus();
                Save();
                break;

            case "btn_Abort":        // ButtonTool
                HienThiDSHoaDon();
                flxHoaDon_Click(sender, e);
                break;

            case "btn_Del":        // ButtonTool
                Del();
                break;

            case "btnExportHD":        // ButtonTool
                XuatHoaDon();
                break;
            }
        }
Esempio n. 12
0
        private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
        {
            switch (e.Tool.Key)
            {
            case "btn_Save":        // ButtonTool
                flxMatHang.Focus();
                Save();
                break;

            case "btn_Abort":        // ButtonTool
                if (txtID.Text.Trim().Equals("-1") == true)
                {
                    Add();
                }
                else
                {
                    HienThiTTHoaDon(); HienThiDSMatHang();
                }
                break;

            case "btn_Del":        // ButtonTool
                Del();
                break;

            case "btnExportHD":        // ButtonTool
                XuatHoaDon();
                break;
            }
        }
Esempio n. 13
0
 private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
 {
     if (e.Tool.Key == "Query")
     {
         DoQuery();
     }
     if (e.Tool.Key == "Update")
     {
         DoUpdate();
         DoQuery();
     }
     if (e.Tool.Key == "Add")
     {
         DoAdd();
         DoQuery();
     }
     if (e.Tool.Key == "Delete")
     {
         DoDelete();
         DoQuery();
     }
     if (e.Tool.Key == "Excel")
     {
         DoExcel();
     }
 }
Esempio n. 14
0
        private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
        {
            switch (e.Tool.Key)
            {
            case "Query":
            {
                this.GetWeightInfo("");
                break;
            }

            case "导出":
            {
                CommonMethod.ExportDataWithSaveDialog2(ref this.ultraGrid1, "棒材计量数据");
                break;
            }

            case "判定不合格":
            {
                this.Save();
                break;
            }

            case "撤销不合格":
            {
                this.Cancel();
                break;
            }

            case "补打":
            {
                this.Reprint();
                break;
            }
            }
        }
Esempio n. 15
0
        private void ultraToolbarsManager_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
        {
            switch (e.Tool.Key)
            {
            case "Add":                        // ButtonTool
                // Place code here
                if (OnToolBarAddClick != null)
                {
                    OnToolBarAddClick(sender, e);
                }
                break;

            case "Delete":                        // ButtonTool
                // Place code here
                break;

            case "Save":                        // ButtonTool
                // Place code here
                break;

            case "Cancel":                        // ButtonTool
                // Place code here
                break;
            }
        }
Esempio n. 16
0
        private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
        {
            switch (e.Tool.Key)
            {
            case "Query":
            {
                if (rbtn_BatchInfo.Checked)
                {
                    this.GetBatchInfo(QueryOpportunity.UI);
                }
                else
                {
                    this.GetStockInfo(QueryOpportunity.UI);
                }
                break;
            }

            case "Save":
            {
                this.Save();
                break;
            }

            case "Cancel":
            {
                this.Cancel();
                break;
            }
            }
        }
Esempio n. 17
0
        private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
        {
            switch (e.Tool.Key.ToString())
            {
            case "Query":
            {
                QueryLog();
                //Query();
                break;
            }

            case "Update":
            {
                Update();
                Query();
                break;
            }
            //case "Add":
            //        {
            //        Add();
            //            Query();
            //            break;
            //        }

            case "Delete":
            {
                Delete();
                Query();
                break;
            }

            default:
                break;
            }
        }
Esempio n. 18
0
        //下载磅房对应装货点基础信息

        //private void DownLoadLoadPoint()
        //{
        //    try
        //    {
        //        string strSql = "select A.FS_PointNo, A.FS_LOAD, b.FS_LOADPOINTNAME, b.FS_HELPCODE, a.fn_times ";
        //        strSql += " from BT_POINTLOAD A, It_LOADPOINT B, Bt_Point C ";
        //        strSql += " where A.Fs_pointno = C.Fs_Pointcode and A.FS_LOAD = B.Fs_ZH and C.Fs_Pointtype = 'QC' ";
        //        strSql += "  order by a.fn_times desc ";

        //        CoreClientParam ccp = new CoreClientParam();
        //        ccp.ServerName = "ygjzjl.base.QueryData";//kiscicplat
        //        ccp.MethodName = "queryByClientSql";
        //        ccp.ServerParams = new object[] { strSql };
        //        ccp.SourceDataTable = this.m_LoadPointTable;

        //        this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
        //    }
        //    catch (Exception ex)
        //    {
        //        Console.Write("发生异常:" + ex.Message + "\n");
        //        Console.Read();
        //    }
        //}
        //下载磅房对应卸货点基础信息

        //private void DownLoadUnLoadPoint()
        //{
        //    try
        //    {
        //        string strSql = "select A.FS_PointNo, A.FS_UNLOAD, b.FS_UNLOADPOINTNAME, b.FS_HELPCODE, a.fn_times ";
        //        strSql += " from BT_POINTUNLOAD A, It_UNLOADPOINT B, Bt_Point C ";
        //        strSql += " where A.Fs_pointno = C.Fs_Pointcode and A.FS_UNLOAD = B.Fs_XH and C.Fs_Pointtype = 'QC' ";
        //        strSql += "  order by a.fn_times desc ";

        //        CoreClientParam ccp = new CoreClientParam();
        //        ccp.ServerName = "ygjzjl.base.QueryData";//kiscicplat
        //        ccp.MethodName = "queryByClientSql";
        //        ccp.ServerParams = new object[] { strSql };
        //        ccp.SourceDataTable = this.m_UnLoadPointTable;

        //        this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
        //    }
        //    catch (Exception ex)
        //    {
        //        Console.Write("发生异常:" + ex.Message + "\n");
        //        Console.Read();
        //    }
        //}



        private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
        {
            switch (e.Tool.Key.ToString())
            {
            case "Query":
            {
                if (this.dtpBegin.Value > this.dtpEnd.Value)
                {
                    MessageBox.Show("开始日期必须小于结束日期!");
                    return;
                }
                queryFirstDataByDate();
            }
            break;

            case "ToExcel":
                try
                {
                    Constant.ExportGrid2Excel(this, this.ultraGridExcelExporter1, ultraGrid1);
                    Constant.WaitingForm.Close();
                }
                catch (Exception e1)
                {
                }
                break;

            default:
                break;
            }
        }
Esempio n. 19
0
        private void toolbarsManager_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
        {
            switch (e.Tool.Key)
            {
            case "mnuStopSearch":
                if (MessageBox.Show(Resources.TEXT_CONFIRM_INTERRUPT_SEARCHING, Resources.TEXT_CONFIRMATION, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    this.EventHandler_StopSearch(sender, e);
                }
                break;

            case "mnuClearList":
                this.EventHandler_ClearList(sender, e);
                break;

            case "mnuCheckAll":
                this.EventHandler_CheckAll(sender, e);
                break;

            case "mnuUncheckAll":
                this.EventHandler_UncheckAll(sender, e);
                break;

            default:
                break;
            }
        }
Esempio n. 20
0
        private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
        {
            switch (e.Tool.Key.ToString())
            {
            case "ReadCard":
                if (e.Tool.SharedProps.Caption.Equals("启动"))
                {
                    startCarCardScan();
                }
                else
                {
                    stopCarCardScan();
                }
                break;

            case "LetGo":    //放行
                LetGo();
                break;

            case "Query":
                string condtion = "";
                condtion += ultraDateTimeEditor1.Value != null ? " AND (TO_CHAR(T.FD_ENTERFACTIME,'YYYYMMDD') >= '" + ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd") + "'" : " AND (1=1";
                condtion += ultraDateTimeEditor2.Value != null ? " AND TO_CHAR(T.FD_EXITFACTIME,'YYYYMMDD') <= '" + ultraDateTimeEditor2.DateTime.ToString("yyyyMMdd") + "'" : "";
                condtion += !string.IsNullOrEmpty(comboBox1.Text.Trim()) || !string.IsNullOrEmpty(textBox1.Text.Trim()) ? " AND T.FS_CARNO LIKE '%" + comboBox1.Text.Trim() + textBox1.Text.Trim() + "%'" : "";
                condtion += ultraCheckEditor1.Checked ? " AND T.FN_ENTERFACFLAG = 2)" : "";
                if (!ultraCheckEditor1.Checked)
                {
                    condtion += !string.IsNullOrEmpty(condtion.Trim()) ? " OR NVL(T.FN_ENTERFACFLAG,1) = 1)" : "";
                }
                Query(condtion);
                break;
            }
        }
Esempio n. 21
0
        private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
        {
            switch (e.Tool.Key)
            {
            case "Query":
            {
                this.GetWeightInfo();
                break;
            }

            case "GetElements":
            {
                GetQSElements();
                break;
            }

            case "Modify":
            {
                updateElements();
                break;
            }

            case "改判":
            {
                updateSteelType();
                break;
            }
            }
        }
Esempio n. 22
0
        private void uToolBar_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
        {
            lstHint1.Items.Clear();
            lstHint2.Items.Clear();
            switch (e.Tool.Key.ToString())
            {
            case "find":
            {
                if (!getStrWhere())
                {
                    break;
                }
                showGridInfo();
                break;
            }

            case "Edit":
            {
                doUpdate();
                showGridInfo();
                break;
            }

            case "CancelUpdate":
            {
                CancelUpdate();
                showGridInfo();
                break;
            }

            case "UpSap":
            {
                upLoadData();
                showGridInfo();
                break;
            }

            case "ToExcel":
            {
                Constant.ExportGrid2Excel(this, this.ultraGridExcelExporter1, uGridData);

                if (Constant.WaitingForm != null)
                {
                    Constant.WaitingForm.Close();
                }

                break;
            }

            case "inExcel":
            {
                openExcel();
                showGridInfo();
                break;
            }
            }
        }
Esempio n. 23
0
 private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
 {
     switch (e.Tool.Key)
     {
     case "查询":
         QueryFirstData();
         break;
     }
 }
 private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
 {
     switch (e.Tool.Key)
     {
     case "btn_Save":        // ButtonTool
         Save();
         break;
     }
 }
Esempio n. 25
0
 private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
 {
     switch (e.Tool.Key)
     {
     case "Find":
         string str = textBox2.Text.Trim();
         FindStr(str);
         break;
     }
 }
Esempio n. 26
0
        //右键菜单点击事件
        private void toolManager_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
        {
            string strItemName = e.Tool.SharedProps.Caption.ToString();

            switch (strItemName)
            {
            case "绝对坐标(&A)...":
                frmAbsXYZ.m_pPoint = m_pAnchorPoint;
                frmAbsXYZ formXYZ = new frmAbsXYZ();
                formXYZ.ShowDialog();

                if (m_bInputWindowCancel == false)                       //若用户没用取消输入
                {
                    DrawCircle3PMouseDown(m_pAnchorPoint, 0);
                }

                break;

            case "相对坐标(&R)...":
                IPoint tempPoint = new PointClass();
                tempPoint.X         = m_pLastPoint.X;
                tempPoint.Y         = m_pLastPoint.Y;
                frmRelaXYZ.m_pPoint = tempPoint;
                frmRelaXYZ formRelaXYZ = new frmRelaXYZ();
                formRelaXYZ.ShowDialog();

                if (m_bInputWindowCancel == false)                       //若用户没用取消输入
                {
                    DrawCircle3PMouseDown(m_pAnchorPoint, 0);
                }

                break;

            case "平行(&P)...":
                m_pSegment  = null;
                m_bKeyCodeP = true;
                CommonFunction.ParallelRule(ref m_bKeyCodeP, m_pActiveView, m_dblTolerance, ref m_pSegment, m_pLastPoint, m_BeginConstructParallelPoint, ref m_pAnchorPoint);

                break;

            case "完成(&E)":
                DrawCircle3PMouseDown(m_pAnchorPoint, 0);

                break;

            case "取消(ESC)":
                Reset();

                break;

            default:

                break;
            }
        }
 private void tbrFunction_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
 {
     try
     {
         ToolbarClick(e.Tool.Key);
     }
     catch (Exception ex)
     {
         MessageBoxCommon.ShowException(ex);
     }
 }
Esempio n. 28
0
 private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
 {
     switch (e.Tool.Key.ToString())
     {
     case "Query":
     {
         QueryGuideCardNoInfo();
         break;
     }
     }
 }
Esempio n. 29
0
        private void Toolbar_Application_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
        {
            try
            {
                switch (e.Tool.Key)
                {
                case "BTN_Users":
                case "BTN_Books":
                    //this.IsMdiContainer = true;
                    Frm_BOOKS Form2 = new Frm_BOOKS();
                    //Form2.MdiParent = this;
                    Form2.ShowDialog();
                    break;

                case "BTN_Students":
                    this.IsMdiContainer = true;
                    FRM_Students Form = new FRM_Students();
                    //Form.MdiParent = this;
                    Form.ShowDialog();
                    break;

                case "BTN_CreateQuestion":
                    this.IsMdiContainer = true;
                    FRM_Questions vFrm_Questions = new FRM_Questions();
                    vFrm_Questions.ShowDialog();
                    break;

                case "BTN_Exams":
                    string visExamTaken = BasicClass.fReturnScalar("SELECT ISNULL(IsExamTaken,'N') from [User] WHERE ID =" + BasicClass.vUsrID + " ", this.Name);
                    if (visExamTaken.Trim().ToUpper() == "Y")
                    {
                        MessageBox.Show("هذا المستخدم قام بتأدية ذلك الامتحان من قبل", "", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        break;
                    }
                    else
                    {
                        this.IsMdiContainer = true;
                        FRM_Exam vFrm_Exam = new FRM_Exam();
                        vFrm_Exam.ShowDialog();
                        break;
                    }

                case "BTN_Reports":
                    break;
                }
            }

            catch (Exception ex)
            {
                ExceptionHandler.HandleException(ex.Message, this.Name, "Toolbar_Application_ToolClick");
            }
        }
Esempio n. 30
0
 private void tbrManager_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
 {
     try
     {
         LoadData();
         ToolbarClick(e.Tool.Key);
         OnLoadAreaStatus(e);
     }
     catch (Exception ex)
     {
         MessageBoxCommon.ShowException(ex);
     }
 }