public ReserveSectionInfoForm(BCMainForm _form)
        {
            InitializeComponent();
            form = _form;
            //uctlReserveSectionView1.Start(form.BCApp);
            bcApp = _form.BCApp;
            uctlReserveSectionView1.Start(bcApp);

            List <string> lstVh = new List <string>();

            lstVh.Add(string.Empty);
            lstVh.AddRange(bcApp.SCApplication.VehicleBLL.loadAllVehicle().
                           Select(vh => sc.Common.SCUtility.Trim(vh.VEHICLE_ID, true)).
                           ToList());
            string[] allVh = lstVh.ToArray();
            BCUtility.setComboboxDataSource(cmb_vh_ids, allVh);


            List <AADDRESS> allAddress_obj = bcApp.SCApplication.MapBLL.loadAllAddress();

            string[] allAdr_ID = allAddress_obj.Select(adr => adr.ADR_ID).ToArray();
            BCUtility.setComboboxDataSource(cmb_adr_id, allAdr_ID);

            List <ASECTION> sections = bcApp.SCApplication.SectionBLL.cache.GetSections();

            string[] allSec_ID = sections.Select(sec => sec.SEC_ID).ToArray();
            BCUtility.setComboboxDataSource(cmb_reserve_section, allSec_ID.ToArray());

            cmb_fork_dir.DataSource      = Enum.GetValues(typeof(HltDirection)).Cast <HltDirection>();
            cmb_sensor_dir.DataSource    = Enum.GetValues(typeof(HltDirection)).Cast <HltDirection>();
            cmb_vh_fork_dir.DataSource   = Enum.GetValues(typeof(HltDirection)).Cast <HltDirection>();
            cmb_vh_sensor_dir.DataSource = Enum.GetValues(typeof(HltDirection)).Cast <HltDirection>();
            //bcApp.SCApplication.ReserveBLL.ReserveStatusChange += ReserveBLL_ReserveStatusChange;
        }
Beispiel #2
0
        private void UpdBtn_Click(object sender, EventArgs e)
        {
            if (!BCUtility.doLogin(this, bcApp, BCAppConstants.FUNC_USER_MANAGEMENT))
            {
                return;
            }
            string func_code = FuncCodeTBx.Text.Trim();
            string func_name = FuncNameTBx.Text.Trim();

            if (!checkInputData())
            {
                return;
            }

            Boolean updSuccess =
                bcApp.SCApplication.UserBLL.updateFunctionCodeByCode(func_code, func_name);

            if (updSuccess)
            {
                //MessageBox.Show(this, BCApplication.getMessageString("UPDATE_SUCCESS"));
                BCUtility.showMsgBox_Info(this, BCApplication.getMessageString("UPDATE_SUCCESS"));
                Refresh();
            }
            else
            {
                //MessageBox.Show(this, BCApplication.getMessageString("UPDATE_FAILED"));
                BCUtility.showMsgBox_Info(this, BCApplication.getMessageString("UPDATE_FAILED"));
            }
        }
Beispiel #3
0
        /// <summary>
        /// Handles the Click event of the stopConnectionToolStripMenuItem1 control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
        private void stopConnectionToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            if (!BCUtility.doLogin(this, bcApp, BCAppConstants.FUNC_CONNECTION_MANAGEMENT))
            {
                return;
            }
            try
            {
                DialogResult confirmResult = MessageBox.Show(this, BCApplication.getMessageString("Confirm_STOP_CONNECTING"),
                                                             BCApplication.getMessageString("CONFIRM"), MessageBoxButtons.YesNo);
                if (confirmResult != System.Windows.Forms.DialogResult.Yes)
                {
                    return;
                }

                ProgressBarDialog progress = new ProgressBarDialog(bcApp);
                System.Threading.ThreadPool.QueueUserWorkItem(
                    new System.Threading.WaitCallback(doStopConnection), progress);
                if (progress != null && !progress.IsDisposed)
                {
                    progress.ShowDialog();
                }
            }
            catch (Exception ex)
            {
                logger.Error(ex, "Exception:");
            }
        }
        private void AddBtn_Click(object sender, EventArgs e)
        {
            if (!BCUtility.doLogin(this, bcApp, BCAppConstants.FUNC_USER_MANAGEMENT))
            {
                return;
            }
            string user_group = this.UserGroupTbx.Text.Trim();

            if (!checkInputData())
            {
                return;
            }

            Boolean createSuccess = bcApp.SCApplication.UserBLL.addUserGroup(user_group);

            if (createSuccess)
            {
                //MessageBox.Show(this, BCApplication.getMessageString("CREATE_SUCCESS"));
                BCUtility.showMsgBox_Info(this, BCApplication.getMessageString("CREATE_SUCCESS"));
                Refresh();
            }
            else
            {
                //MessageBox.Show(this, BCApplication.getMessageString("CREATE_FAILED"));
                BCUtility.showMsgBox_Info(this, BCApplication.getMessageString("CREATE_FAILED"));
            }
        }
        private void ratioChanges()
        {
            double space_Height_PixelsHeight = BCUtility.RealLengthToPixelsWidthByScale(space_Height_m);
            double space_Height_PixelsWidth  = BCUtility.RealLengthToPixelsWidthByScale(space_Width_m);

            pnl_Map.Size = new Size((int)space_Height_PixelsWidth, (int)space_Height_PixelsHeight);
        }
        private void initialComBox()
        {
            List <AADDRESS> allAddress_obj = scApp.MapBLL.loadAllAddress();

            allAdr_ID = allAddress_obj.Select(adr => adr.ADR_ID).ToArray();
            //string[] adr_port1_ID = allAddress_obj.
            //                        Where(adr => adr.PORT1_ID != null && adr.PORT1_ID != string.Empty).
            //                        Select(adr => adr.PORT1_ID).ToArray();
            //string[] adr_port2_ID = allAddress_obj.
            //            Where(adr => adr.PORT2_ID != null && adr.PORT2_ID != string.Empty).
            //            Select(adr => adr.PORT2_ID).ToArray();
            //List<string> portIDTemp = new List<string>();
            //portIDTemp.AddRange(adr_port1_ID);
            //portIDTemp.AddRange(adr_port2_ID);
            //portIDTemp.OrderBy(id => id);
            //allPortID = scApp.MapBLL.loadAllPort().Select(s => s.PORT_ID).ToArray();
            allPortID = scApp.PortStationBLL.OperateCatch.loadAllPortStation().
                        Where(s => !s.PORT_ID.Contains("_ST0")).
                        Select(s => SCUtility.Trim(s.PORT_ID, true)).ToArray();
            //allPortID = allAddress_obj.Where(adr=>adr.
            BCUtility.setComboboxDataSource(cmb_toAddress, allAdr_ID);
            BCUtility.setComboboxDataSource(cmb_fromAddress, allAdr_ID.ToArray());
            //cmb_fromAddress.DataSource = allAdr_ID.ToArray();
            //cmb_fromAddress.AutoCompleteCustomSource.AddRange(allAdr_ID);
            //cmb_fromAddress.AutoCompleteMode = AutoCompleteMode.Suggest;
            //cmb_fromAddress.AutoCompleteSource = AutoCompleteSource.ListItems;



            string[] allSec = scApp.MapBLL.loadAllSectionID().ToArray();
            cmb_fromSection.DataSource = allSec;
            cmb_fromSection.AutoCompleteCustomSource.AddRange(allSec);
            cmb_fromSection.AutoCompleteMode   = AutoCompleteMode.Suggest;
            cmb_fromSection.AutoCompleteSource = AutoCompleteSource.ListItems;


            List <string> lstVh = new List <string>();

            lstVh.Add(string.Empty);
            lstVh.AddRange(scApp.VehicleBLL.cache.loadAllVh().Select(vh => vh.VEHICLE_ID).ToList());
            string[] allVh = lstVh.ToArray();
            cmb_Vehicle.DataSource = allVh;
            cmb_Vehicle.AutoCompleteCustomSource.AddRange(allVh);
            cmb_Vehicle.AutoCompleteMode   = AutoCompleteMode.Suggest;
            cmb_Vehicle.AutoCompleteSource = AutoCompleteSource.ListItems;

            cbm_Action_admin.DataSource = Enum.GetValues(typeof(E_CMD_TYPE)).Cast <E_CMD_TYPE>()
                                          .Where(e => e != E_CMD_TYPE.Move_Park &&
                                                 e != E_CMD_TYPE.Teaching &&
                                                 e != E_CMD_TYPE.Continue &&
                                                 e != E_CMD_TYPE.Round &&
                                                 e != E_CMD_TYPE.Override &&
                                                 e != E_CMD_TYPE.MTLHome &&
                                                 e != E_CMD_TYPE.Move_Teaching
                                                 ).ToList();

            cbm_Action_op.DataSource = Enum.GetValues(typeof(E_CMD_TYPE)).Cast <E_CMD_TYPE>()
                                       .Where(e => e == E_CMD_TYPE.Move).ToList();
        }
 private void ChangePwdForm_Load(object sender, EventArgs e)
 {
     if (!BCUtility.isLogin(bcApp))
     {
         return;
     }
     m_yourIDTxb.Text = bcApp.LoginUserID;
 }
        private bool readRailDatas()
        {
            bool bRet            = false;
            int  iRailDatasCount = 0;

            try
            {
                IEnumerable <ARAIL> enumerRail = null;
                enumerRail      = mainForm.BCApp.SCApplication.MapBLL.loadAllRail();
                iRailDatasCount = enumerRail.Count();
                if (iRailDatasCount > 0)
                {
                    m_objItemRail = new uctlRail[iRailDatasCount];

                    int index = 0;
                    foreach (ARAIL rail in enumerRail)
                    {
                        m_objItemRail[index]                  = new uctlRail();
                        m_objItemRail[index].p_Num            = index + 1;
                        m_objItemRail[index].p_ID             = rail.RAIL_ID;
                        m_objItemRail[index].p_RailType       = rail.RAILTYPE;
                        m_objItemRail[index].p_StrMapRailInfo = rail;
                        m_objItemRail[index].p_RailWidth      = (int)rail.WIDTH;
                        m_objItemRail[index].p_RailColor      = BCUtility.ConvStr2Color(rail.COLOR);
                        m_objItemRail[index].p_LocX           = rail.LOCATIONX;
                        m_objItemRail[index].p_LocY           = rail.LOCATIONY;
                        m_objItemRail[index].p_RailLength     = (int)rail.LENGTH;
                        if (m_objItemRail[index].p_RailType == E_RAIL_TYPE.Straight_Vertical)
                        {
                            m_objItemRail[index].Tag = m_objItemRail[index].Top + "|" + m_objItemRail[index].Left + "|"
                                                       + m_objItemRail[index].Height + "|" + m_objItemRail[index].p_RailWidth;
                        }
                        else
                        {
                            m_objItemRail[index].Tag = m_objItemRail[index].Top + "|" + m_objItemRail[index].Left + "|"
                                                       + m_objItemRail[index].Width + "|" + m_objItemRail[index].p_RailWidth;
                        }

                        if (m_objItemRail[index].p_RailType == E_RAIL_TYPE.Arrow_Up ||
                            m_objItemRail[index].p_RailType == E_RAIL_TYPE.Arrow_Down ||
                            m_objItemRail[index].p_RailType == E_RAIL_TYPE.Arrow_Left ||
                            m_objItemRail[index].p_RailType == E_RAIL_TYPE.Arrow_Right)
                        {
                            m_objItemRail[index].Visible = false;
                        }
                        index++;
                    }
                    this.pnl_Map.Controls.AddRange(m_objItemRail);
                }
                bRet = true;
            }
            catch (Exception ex)
            {
                bRet = false;
                logger.Error(ex, "Exception");
            }
            return(bRet);
        }
        public void start(BCMainForm _main, OHT_Form _ohtc_Form)
        {
            mainForm  = _main;
            ohtc_Form = _ohtc_Form;
            initialMapSpace();

            lbl_Through_Times_Lv1.BackColor  = BCAppConstants.SEC_THROUGH_COLOR_LV1;
            lbl_Through_Times_Lv2.BackColor  = BCAppConstants.SEC_THROUGH_COLOR_LV2;
            lbl_Through_Times_Lv3.BackColor  = BCAppConstants.SEC_THROUGH_COLOR_LV3;
            lbl_Through_Times_Lv4.BackColor  = BCAppConstants.SEC_THROUGH_COLOR_LV4;
            lbl_Through_Times_Lv5.BackColor  = BCAppConstants.SEC_THROUGH_COLOR_LV5;
            lbl_Through_Times_Lv6.BackColor  = BCAppConstants.SEC_THROUGH_COLOR_LV6;
            lbl_Through_Times_Lv7.BackColor  = BCAppConstants.SEC_THROUGH_COLOR_LV7;
            lbl_Through_Times_Lv8.BackColor  = BCAppConstants.SEC_THROUGH_COLOR_LV8;
            lbl_Through_Times_Lv9.BackColor  = BCAppConstants.SEC_THROUGH_COLOR_LV9;
            lbl_Through_Times_Lv10.BackColor = BCAppConstants.SEC_THROUGH_COLOR_LV10;
            lbl_Through_Times_Lv1.Text       = $"{0} ~ {BCAppConstants.SEC_THROUGH_TIMES_LV1}";
            lbl_Through_Times_Lv2.Text       = $"{BCAppConstants.SEC_THROUGH_TIMES_LV1} ~ {BCAppConstants.SEC_THROUGH_TIMES_LV2}";
            lbl_Through_Times_Lv3.Text       = $"{BCAppConstants.SEC_THROUGH_TIMES_LV2} ~ {BCAppConstants.SEC_THROUGH_TIMES_LV3}";
            lbl_Through_Times_Lv4.Text       = $"{BCAppConstants.SEC_THROUGH_TIMES_LV3} ~ {BCAppConstants.SEC_THROUGH_TIMES_LV4}";
            lbl_Through_Times_Lv5.Text       = $"{BCAppConstants.SEC_THROUGH_TIMES_LV4} ~ {BCAppConstants.SEC_THROUGH_TIMES_LV5}";
            lbl_Through_Times_Lv6.Text       = $"{BCAppConstants.SEC_THROUGH_TIMES_LV5} ~ {BCAppConstants.SEC_THROUGH_TIMES_LV6}";
            lbl_Through_Times_Lv7.Text       = $"{BCAppConstants.SEC_THROUGH_TIMES_LV6} ~ {BCAppConstants.SEC_THROUGH_TIMES_LV7}";
            lbl_Through_Times_Lv8.Text       = $"{BCAppConstants.SEC_THROUGH_TIMES_LV7} ~ {BCAppConstants.SEC_THROUGH_TIMES_LV8}";
            lbl_Through_Times_Lv9.Text       = $"{BCAppConstants.SEC_THROUGH_TIMES_LV8} ~ {BCAppConstants.SEC_THROUGH_TIMES_LV9}";
            lbl_Through_Times_Lv10.Text      = $"{BCAppConstants.SEC_THROUGH_TIMES_LV9} ~ ";



            readRailDatas();
            readAddressPortDatas();
            //readVehicleDatas();
            readNewVehicleDatas();
            readPortIconDatas();

            m_DicSectionGroupRails = new Dictionary <string, GroupRails>();
            m_DicSegmentGroupRails = new Dictionary <string, List <GroupRails> >();
            BidingRailPointAndGroupForRail();
            BidingGroupRailsAndAddress();
            adjustTheLayerOrder();
            if (m_objItemRail != null && m_objItemRail.Count() > 0)
            {
                RailOriginalColor = m_objItemRail[0].p_RailColor;
                zInitialIndex     = pnl_Map.Controls.GetChildIndex(m_objItemRail.Last());
            }
            List <string> selectSeg = new List <string>();

            selectSeg.Add("");
            selectSeg.AddRange(m_DicSegmentGroupRails.Keys.ToList());
            cmb_selectSeg.DataSource = selectSeg;
            tmrRefresh.Start();
            BCUtility.setScale(defaultMaxScale, zoon_Factor);
            ratioChanges();
            BidingGroupRailsLable();
            BidingAddressLable();

            initialLineEvent();
        }
Beispiel #10
0
        private bool readAddressPortDatas()
        {
            bool bRet       = false;
            int  iAddrCount = 0;

            try
            {
                IEnumerable <AADDRESS> enumerAdr = mainForm.BCApp.SCApplication.MapBLL.loadAllAddress();

                iAddrCount = enumerAdr.Count();

                int index = 0;
                m_objItemAddr = new uctlAddress[iAddrCount];
                foreach (AADDRESS adr in enumerAdr)
                {
                    m_objItemAddr[index]           = new uctlAddress(this);
                    m_objItemAddr[index].p_AddrPt  = index;
                    m_objItemAddr[index].p_Address = adr.ADR_ID.Trim();
                    var port_obj = mainForm.BCApp.SCApplication.PortStationBLL.OperateCatch.getPortStationByID(adr.ADR_ID.Trim());
                    if (port_obj != null)
                    {
                        m_objItemAddr[index].p_Port = port_obj.PORT_ID.Trim();
                    }
                    APOINT point = mainForm.BCApp.SCApplication.MapBLL.getPointByID(adr.ADR_ID);
                    if (point != null)
                    {
                        m_objItemAddr[index].str_Map_Add_Info = point;
                        m_objItemAddr[index].p_LayoutPoint    = 0;
                        m_objItemAddr[index].p_Text           = string.Empty;
                        m_objItemAddr[index].p_PointType      = point.POINTTYPE;
                        m_objItemAddr[index].p_LocX           = point.LOCATIONX;
                        m_objItemAddr[index].p_LocY           = point.LOCATIONY;
                        m_objItemAddr[index].p_SizeW          = (int)point.WIDTH;
                        m_objItemAddr[index].p_SizeH          = (int)point.HEIGHT;
                        m_objItemAddr[index].p_Color          = BCUtility.ConvStr2Color(point.COLOR);
                        m_objItemAddr[index].p_ZoomLV         = adr.ZOOM_LV;
                        m_objItemAddr[index].Visible          = adr.ZOOM_LV >= trackBar_scale.Value;
                        m_objItemAddr[index].Tag = m_objItemAddr[index].Top + "|" + m_objItemAddr[index].Left + "|"
                                                   + m_objItemAddr[index].Height + "|" + m_objItemAddr[index].Width;
                    }
                    index++;
                }

                if (iAddrCount > 0)
                {
                    this.pnl_Map.Controls.AddRange(m_objItemAddr);
                }

                bRet = true;
            }
            catch (Exception ex)
            {
                bRet = false;
                logger.Error(ex, "Exception");
            }
            return(bRet);
        }
        private void initialComBox()
        {
            List <AADDRESS> allAddress_obj = scApp.MapBLL.loadAllAddress();

            allAdr_ID = allAddress_obj.Select(adr => adr.ADR_ID).ToArray();
            //string[] adr_port1_ID = allAddress_obj.
            //                        Where(adr => adr.PORT1_ID != null && adr.PORT1_ID != string.Empty).
            //                        Select(adr => adr.PORT1_ID).ToArray();
            //string[] adr_port2_ID = allAddress_obj.
            //            Where(adr => adr.PORT2_ID != null && adr.PORT2_ID != string.Empty).
            //            Select(adr => adr.PORT2_ID).ToArray();
            //List<string> portIDTemp = new List<string>();
            //portIDTemp.AddRange(adr_port1_ID);
            //portIDTemp.AddRange(adr_port2_ID);
            //portIDTemp.OrderBy(id => id);
            allPortID = scApp.MapBLL.loadAllPort().Select(s => s.PORT_ID).ToArray();
            //allPortID = allAddress_obj.Where(adr=>adr.
            BCUtility.setComboboxDataSource(cmb_toAddress, allAdr_ID);
            BCUtility.setComboboxDataSource(cmb_fromAddress, allAdr_ID.ToArray());
            //cmb_fromAddress.DataSource = allAdr_ID.ToArray();
            //cmb_fromAddress.AutoCompleteCustomSource.AddRange(allAdr_ID);
            //cmb_fromAddress.AutoCompleteMode = AutoCompleteMode.Suggest;
            //cmb_fromAddress.AutoCompleteSource = AutoCompleteSource.ListItems;


            string[] allCycleRunZone = scApp.CycleBLL.loadCycleRunMasterByCurrentCycleTypeID
                                           (scApp.getEQObjCacheManager().getLine().Currnet_Cycle_Type).Select(master => master.ENTRY_ADR_ID).ToArray();
            cmb_cycRunZone.DataSource = allCycleRunZone;


            string[] allSec = scApp.MapBLL.loadAllSectionID().ToArray();
            cmb_fromSection.DataSource = allSec;
            cmb_fromSection.AutoCompleteCustomSource.AddRange(allSec);
            cmb_fromSection.AutoCompleteMode   = AutoCompleteMode.Suggest;
            cmb_fromSection.AutoCompleteSource = AutoCompleteSource.ListItems;


            List <string> lstVh = new List <string>();

            lstVh.Add(string.Empty);
            lstVh.AddRange(scApp.VehicleBLL.loadAllVehicle().Select(vh => vh.VEHICLE_ID).ToList());
            string[] allVh = lstVh.ToArray();
            cmb_Vehicle.DataSource = allVh;
            cmb_Vehicle.AutoCompleteCustomSource.AddRange(allVh);
            cmb_Vehicle.AutoCompleteMode   = AutoCompleteMode.Suggest;
            cmb_Vehicle.AutoCompleteSource = AutoCompleteSource.ListItems;

            cbm_Action.DataSource = Enum.GetValues(typeof(E_CMD_TYPE)).Cast <E_CMD_TYPE>()
                                    .Where(e => e != E_CMD_TYPE.Continue &&
                                           e != E_CMD_TYPE.Move_Park).ToList();


            List <string> park_zone_type = scApp.ParkBLL.loadAllParkZoneType();

            cb_parkZoneType.DataSource = park_zone_type;
        }
Beispiel #12
0
        private void initialMapSpace()
        {
            if (BCFUtility.isMatche(mainForm.BCApp.SCApplication.BC_ID, SCAppConstants.WorkVersion.VERSION_NAME_ASE))
            {
                space_Height_m             = 14000;
                space_Width_m              = 40000;
                zoon_Factor                = 100;
                defaultMaxScale            = 10;
                trackBar_scale.SmallChange = 2;
            }
            else if (BCFUtility.isMatche(mainForm.BCApp.SCApplication.BC_ID, SCAppConstants.WorkVersion.VERSION_NAME_ASE_LOOP))
            {
                space_Height_m             = 14000;
                space_Width_m              = 53000;
                zoon_Factor                = 100;
                defaultMaxScale            = 10;
                trackBar_scale.SmallChange = 2;
            }
            else if (BCFUtility.isMatche(mainForm.BCApp.SCApplication.BC_ID, SCAppConstants.WorkVersion.VERSION_NAME_ASE_LINE3))
            {
                space_Height_m             = 14000;
                space_Width_m              = 50000;
                zoon_Factor                = 100;
                defaultMaxScale            = 10;
                trackBar_scale.SmallChange = 2;
            }
            else if (BCFUtility.isMatche(mainForm.BCApp.SCApplication.BC_ID, SCAppConstants.WorkVersion.VERSION_NAME_ASE_TEST))
            {
                space_Height_m             = 14000;
                space_Width_m              = 40000;
                zoon_Factor                = 100;
                defaultMaxScale            = 10;
                trackBar_scale.SmallChange = 2;
            }
            else
            {
                space_Height_m  = 14000;
                space_Width_m   = 40000;
                zoon_Factor     = 100;
                defaultMaxScale = 10;
            }
            trackBar_scale.Maximum = defaultMaxScale;
            trackBar_scale.Value   = defaultMaxScale;
            lbl_maxScale.Text      = defaultMaxScale.ToString();
            //BCUtility.setScale(trackBar_scale.Value);
            BCUtility.setScale(10, zoon_Factor);
            double space_Height_PixelsHeight = BCUtility.RealLengthToPixelsWidthByScale(space_Height_m);
            double space_Height_PixelsWidth  = BCUtility.RealLengthToPixelsWidthByScale(space_Width_m);

            pnl_Map.Height       = (int)space_Height_PixelsHeight;
            pnl_Map.Width        = (int)space_Height_PixelsWidth;
            this.pnl_Map.Resize += new System.EventHandler(this.pnl_Map_Resize);
            pnl_Map.Tag          = pnl_Map.Height + "|" + pnl_Map.Width;
        }
Beispiel #13
0
 /// <summary>
 /// Handles the Click event of the changePasswordToolStripMenuItem control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
 private void changePasswordToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (!BCUtility.isLogin(bcApp))
     {
         if (!BCUtility.doLogin(this, bcApp))
         {
             return;
         }
     }
     openForm("ChangePwdForm");
 }
Beispiel #14
0
 private void logInToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         BCUtility.doLogin(this, bcApp);
     }
     catch (Exception ex)
     {
         logger.Error(ex, "Exception:");
     }
 }
        private void refreshVehicleLoaction_Dic()
        {
            foreach (string adr_id in dicVehicles.Keys)
            {
                for (int i = 0; i < dicVehicles[adr_id].Count(); i++)
                {
                    int      railInterval     = 0;
                    uctlRail matchRail        = findTheMatchingRail(dicVehicles[adr_id].Count() - i, out railInterval);
                    int      railInterval_Pix = (int)BCUtility.RealLengthToPixelsWidthByScale((double)railInterval);

                    int Location_X = 0;
                    int Location_Y = 0;
                    switch (RailDircetion)
                    {
                    case E_RAIL_DIR.F:
                        Location_X = (int)matchRail.p_Points[0].RealPointf.X;
                        Location_Y = (int)matchRail.p_Points[0].RealPointf.Y;
                        if (matchRail.p_RailType == E_RAIL_TYPE.Straight_Horizontal)
                        {
                            dicVehicles[adr_id][i].PrcSetLocation(Location_X + railInterval_Pix, Location_Y);
                        }
                        else if (matchRail.p_RailType == E_RAIL_TYPE.Straight_Vertical)
                        {
                            dicVehicles[adr_id][i].PrcSetLocation(Location_X, Location_Y + railInterval_Pix);
                        }
                        else
                        {
                            dicVehicles[adr_id][i].PrcSetLocation((int)matchRail.p_RealCenterPoint.X, (int)matchRail.p_RealCenterPoint.Y);
                        }
                        break;

                    case E_RAIL_DIR.R:
                        Location_X = (int)matchRail.p_Points[1].RealPointf.X;
                        Location_Y = (int)matchRail.p_Points[1].RealPointf.Y;
                        if (matchRail.p_RailType == E_RAIL_TYPE.Straight_Horizontal)
                        {
                            dicVehicles[adr_id][i].PrcSetLocation(Location_X - railInterval_Pix, Location_Y);
                        }
                        else if (matchRail.p_RailType == E_RAIL_TYPE.Straight_Vertical)
                        {
                            dicVehicles[adr_id][i].PrcSetLocation(Location_X, Location_Y - railInterval_Pix);
                        }
                        else
                        {
                            dicVehicles[adr_id][i].PrcSetLocation((int)matchRail.p_RealCenterPoint.X, (int)matchRail.p_RealCenterPoint.Y);
                        }
                        break;
                    }
                    dicVehicles[adr_id][i].Tag = dicVehicles[adr_id][i].Top + "|" + dicVehicles[adr_id][i].Left + "|"
                                                 + dicVehicles[adr_id][i].Height + "|" + dicVehicles[adr_id][i].Width;
                }
            }
        }
        private void refreshVehicleLoaction(uctlNewVehicle vh, double sec_dis, sc.ProtocolFormat.OHTMessage.DriveDirction driveDirction)
        {
            //if (driveDirction == sc.ProtocolFormat.OHTMessage.DriveDirction.DriveDirReverse)
            //{
            //    if (RealDistance >= sec_dis)//確保不會一減 ,就變負的
            //        sec_dis = RealDistance - sec_dis;
            //    else
            //        sec_dis = 0;
            //}
            double distance_scale = 1;
            double distanceTemp   = 0;

            if (RealDistance > 10)
            {
                distance_scale = sec_dis / RealDistance;
            }
            else
            {
            }
            distanceTemp = Distance * distance_scale;

            int railInterval = 0;


            uctlRail matchRail        = findTheMatchingRail((int)distanceTemp, out railInterval);
            int      railInterval_Pix = (int)BCUtility.RealLengthToPixelsWidthByScale((double)railInterval);

            //int Location_X = 0;
            //int Location_Y = 0;

            KeyValuePair <uctlRail, E_RAIL_DIR> keyValuePairTemp = uctlRails.Where(keyValue => keyValue.Key == matchRail).SingleOrDefault();

            if (keyValuePairTemp.Equals(default(KeyValuePair <uctlRail, E_RAIL_DIR>)))
            {
                return;
            }
            E_RAIL_DIR railDIR = keyValuePairTemp.Value;

            //switch (RailDircetion)
            switch (railDIR)
            {
            case E_RAIL_DIR.F:
                WalkingForward(vh, distance_scale, matchRail, railInterval_Pix);
                break;

            case E_RAIL_DIR.R:
                ReverseWalking(vh, distance_scale, matchRail, railInterval_Pix);
                break;
            }
        }
Beispiel #17
0
        private void initialMapSpace()
        {
            if (BCFUtility.isMatche(mainForm.BCApp.SCApplication.BC_ID, SCAppConstants.WorkVersion.VERSION_NAME_ASE_K21))
            {
                space_Height_m  = 55000; //ASE_K21 地圖地圖大小
                space_Width_m   = 52000;
                zoon_Factor     = 130;
                defaultMaxScale = 13;
            }
            else if (BCFUtility.isMatche(mainForm.BCApp.SCApplication.BC_ID, SCAppConstants.WorkVersion.VERSION_NAME_ASE_K21_DEMO))
            {
                space_Height_m  = 7000; //AGVC 地圖地圖大小
                space_Width_m   = 10000;
                zoon_Factor     = 50;
                defaultMaxScale = 10;
            }
            else if (BCFUtility.isMatche(mainForm.BCApp.SCApplication.BC_ID, SCAppConstants.WorkVersion.VERSION_NAME_TAICHUNG))
            {
                space_Height_m  = 10000; //AGVC 地圖地圖大小
                space_Width_m   = 26000;
                zoon_Factor     = 70;
                defaultMaxScale = 10;
            }
            else if (BCFUtility.isMatche(mainForm.BCApp.SCApplication.BC_ID, SCAppConstants.WorkVersion.VERSION_NAME_AGC))
            {
                space_Height_m  = 35000; //AGVC 地圖地圖大小
                space_Width_m   = 135000;
                zoon_Factor     = 130;
                defaultMaxScale = 10;
            }
            else
            {
                space_Height_m  = 14000;
                space_Width_m   = 40000;
                zoon_Factor     = 100;
                defaultMaxScale = 10;
            }
            trackBar_scale.Maximum = defaultMaxScale;
            trackBar_scale.Value   = defaultMaxScale;
            lbl_maxScale.Text      = defaultMaxScale.ToString();
            //BCUtility.setScale(trackBar_scale.Value);
            BCUtility.setScale(10, zoon_Factor);
            double space_Height_PixelsHeight = BCUtility.RealLengthToPixelsWidthByScale(space_Height_m);
            double space_Height_PixelsWidth  = BCUtility.RealLengthToPixelsWidthByScale(space_Width_m);

            pnl_Map.Height       = (int)space_Height_PixelsHeight;
            pnl_Map.Width        = (int)space_Height_PixelsWidth;
            this.pnl_Map.Resize += new System.EventHandler(this.pnl_Map_Resize);
            pnl_Map.Tag          = pnl_Map.Height + "|" + pnl_Map.Width;
        }
        private void registerFunction()
        {
            if (!BCUtility.doLogin(this, bcApp, BCAppConstants.FUNC_USER_MANAGEMENT))
            {
                return;
            }
            UASUSRGRP selectUserGroup = getSelectedRowToTextBox();

            if (selectUserGroup == null)
            {
                return;
            }

            FuncCodePopupForm funcCodePopupForm = new FuncCodePopupForm();

            funcCodePopupForm.setUserGroup(selectUserGroup.USER_GRP);
            DialogResult  result             = funcCodePopupForm.ShowDialog(this);
            List <UASFNC> selectFuncCodeList = new List <UASFNC>();

            if (result == DialogResult.OK)
            {
                selectFuncCodeList = funcCodePopupForm.getSelectFunctionCodeList();
                funcCodePopupForm.Dispose();
            }
            else
            {
                funcCodePopupForm.Dispose();
                return;
            }
            if (!BCUtility.doLogin(this, bcApp, BCAppConstants.FUNC_USER_MANAGEMENT))
            {
                return;
            }

            List <string> funcCodes       = selectFuncCodeList.Select(o => o.FUNC_CODE.Trim()).ToList();
            Boolean       registerSuccess = bcApp.SCApplication.UserBLL.registerUserFunc(selectUserGroup.USER_GRP, funcCodes);

            if (registerSuccess)
            {
                //MessageBox.Show(this, BCApplication.getMessageString("REGISTER_SUCCESS"));
                BCUtility.showMsgBox_Info(this, BCApplication.getMessageString("REGISTER_SUCCESS"));
                Refresh();
            }
            else
            {
                //MessageBox.Show(this, BCApplication.getMessageString("REGISTER_FAILED"));
                BCUtility.showMsgBox_Info(this, BCApplication.getMessageString("REGISTER_FAILED"));
            }
        }
Beispiel #19
0
        /// <summary>
        /// Handles the FormClosing event of the BCMainForm control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="FormClosingEventArgs"/> instance containing the event data.</param>
        private void BCMainForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            //TODO 確認Authority
            //if (!BCUtility.doLogin(this, bcApp, BCAppConstants.FUNC_CLOSE_MASTER_PC))
            //{
            //    //e.Cancel = true;
            //    //return;
            //}

            //1.初步詢問是否要關閉OHBC
            DialogResult confirmResult = MessageBox.Show(this, "Do you want to close OHTC?",
                                                         BCApplication.getMessageString("CONFIRM"), MessageBoxButtons.YesNo);

            recordAction("Do you want to close OHTC?", confirmResult.ToString());
            if (confirmResult != System.Windows.Forms.DialogResult.Yes)
            {
                e.Cancel = true;
                return;
            }

            if (!SCUtility.isMatche(bcApp.SCApplication.BC_ID, "ASE_LOOP"))
            {
                if (!BCUtility.doLogin(this, bcApp, BCAppConstants.FUNC_CLOSE_SYSTEM, true))
                {
                    e.Cancel = true;
                    recordAction("Close Master PC, Authority Check...", "Failed !!");
                    return;
                }
            }
            recordAction("Close Master PC, Authority Check...", "Success !!");

            if (e.Cancel == false)
            {
                try
                {
                    ProgressBarDialog progress = new ProgressBarDialog(bcApp);
                    System.Threading.ThreadPool.QueueUserWorkItem(
                        new System.Threading.WaitCallback(doStopConnection), progress);
                    if (progress != null && !progress.IsDisposed)
                    {
                        progress.ShowDialog();
                    }
                }
                catch (Exception ex)
                {
                    logger.Error(ex, "Exception");
                }
            }
        }
Beispiel #20
0
 private void logOutToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         BCUtility.doLogout(bcApp);
         MessageBox.Show(this, BCApplication.getMessageString("LOGOUT_SUCCESS")
                         , BCApplication.getMessageString("INFO")
                         , MessageBoxButtons.OK
                         , MessageBoxIcon.Information);
     }
     catch (Exception ex)
     {
         logger.Error(ex, "Exception:");
     }
 }
        public TransferCommandQureyListForm(BCMainForm _mainForm)
        {
            InitializeComponent();
            dgv_TransferCommand.AutoGenerateColumns = false;
            mainform = _mainForm;

            dgv_TransferCommand.DataSource = cmsMCS_bindingSource;

            List <string> lstVh = new List <string>();

            lstVh.Add(string.Empty);
            lstVh.AddRange(mainform.BCApp.SCApplication.VehicleBLL.cache.loadAllVh().Select(vh => vh.VEHICLE_ID).ToList());
            string[] allVh = lstVh.ToArray();
            BCUtility.setComboboxDataSource(cmb_force_assign, allVh);
        }
Beispiel #22
0
        private void MaintainDeviceForm_Load(object sender, EventArgs e)
        {
            List <AEQPT> maintainDevices = bcApp.SCApplication.EquipmentBLL.cache.loadMaintainLift();

            string[] maintain_Lift_id = maintainDevices.Select(eq => eq.EQPT_ID).ToArray();
            BCUtility.setComboboxDataSource(cmb_mtl, maintain_Lift_id.ToArray());
            maintainDevices = bcApp.SCApplication.EquipmentBLL.cache.loadMaintainSpace();
            string[] maintain_Space_id = maintainDevices.Select(eq => eq.EQPT_ID).ToArray();
            BCUtility.setComboboxDataSource(cmb_mts, maintain_Space_id.ToArray());

            List <AVEHICLE> vhs = bcApp.SCApplication.VehicleBLL.cache.loadVhs();

            string[] vh_ids = vhs.Select(vh => vh.VEHICLE_ID).ToArray();
            BCUtility.setComboboxDataSource(cmb_mtl_car_out_vh, vh_ids.ToArray());
            BCUtility.setComboboxDataSource(cmb_mts_car_out_vh, vh_ids.ToArray());
        }
Beispiel #23
0
 /// <summary>
 /// Handles the Click event of the uASToolStripMenuItem control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
 private void uASToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (!BCUtility.doLogin(this, bcApp, BCAppConstants.FUNC_USER_MANAGEMENT))
     {
         return;
     }
     if (uasMainForm == null || uasMainForm.IsDisposed)
     {
         uasMainForm = new UASMainForm();
         uasMainForm.Show();
         uasMainForm.Focus();
     }
     else
     {
         uasMainForm.rework();
         uasMainForm.Focus();
     }
 }
        private bool readPortIconDatas()
        {
            bool bRet           = false;
            int  iPortIconCount = 0;

            try
            {
                IEnumerable <APORTICON> enumerportIcon = mainForm.BCApp.SCApplication.MapBLL.loadAllPortIcon();

                iPortIconCount = enumerportIcon.Count();

                int index = 0;
                m_objItemPortNew = new uctlPortNew[iPortIconCount];
                foreach (APORTICON adr in enumerportIcon)
                {
                    m_objItemPortNew[index]            = new uctlPortNew();
                    m_objItemPortNew[index].p_PortName = adr.PORT_ID;
                    m_objItemPortNew[index].p_Address  = adr.ADR_ID;
                    m_objItemPortNew[index].p_LocX     = adr.LOCATIONX;
                    m_objItemPortNew[index].p_LocY     = adr.LOCATIONY;
                    m_objItemPortNew[index].p_SizeH    = adr.HEIGHT;
                    m_objItemPortNew[index].p_SizeW    = adr.WIDTH;
                    m_objItemPortNew[index].p_Color    = BCUtility.ConvStr2Color(adr.COLOR);

                    m_objItemPortNew[index].Tag = m_objItemPortNew[index].Top + "|" + m_objItemPortNew[index].Left + "|"
                                                  + m_objItemPortNew[index].Height + "|" + m_objItemPortNew[index].Width;

                    index++;
                }

                if (iPortIconCount > 0)
                {
                    this.pnl_Map.Controls.AddRange(m_objItemPortNew);
                }

                bRet = true;
            }
            catch (Exception ex)
            {
                logger.Error(ex, "Exception");
                bRet = false;
            }
            return(bRet);
        }
Beispiel #25
0
        private void DeleteBtn_Click(object sender, EventArgs e)
        {
            if (!BCUtility.doLogin(this, bcApp, BCAppConstants.FUNC_USER_MANAGEMENT))
            {
                return;
            }
            UASFNC selectFuncCode = getSelectedRowToTextBox();

            if (selectFuncCode == null)
            {
                return;
            }
            if (BCFUtility.isMatche(BCAppConstants.FUNC_USER_MANAGEMENT, selectFuncCode.FUNC_CODE))
            {
                return;
            }
            var confirmResult = MessageBox.Show(this, "Are you sure to delete this item ?",
                                                "Confirm Delete!",
                                                MessageBoxButtons.YesNo);

            if (confirmResult != DialogResult.Yes)
            {
                return;
            }

            Boolean deleteSuccess =
                bcApp.SCApplication.UserBLL.deleteFunctionCodeByCode(selectFuncCode.FUNC_CODE);

            if (deleteSuccess)
            {
                //MessageBox.Show(this, BCApplication.getMessageString("DELETE_SUCCESS"));
                BCUtility.showMsgBox_Info(this, BCApplication.getMessageString("DELETE_SUCCESS"));
                Refresh();
            }
            else
            {
                //MessageBox.Show(this, BCApplication.getMessageString("DELETE_FAILED"));
                BCUtility.showMsgBox_Info(this, BCApplication.getMessageString("DELETE_FAILED"));
            }
        }
        private void initialComBox()
        {
            allPortID = scApp.PortDefBLL.GetOHB_PortData(scApp.getEQObjCacheManager().getLine().LINE_ID).Select(s => s.PLCPortID).ToArray();

            List <AADDRESS> allAddress_obj = scApp.MapBLL.loadAllAddress();

            allAdr_ID = allAddress_obj.Select(adr => adr.ADR_ID).ToArray();

            BCUtility.setComboboxDataSource(cmb_toAddress, allAdr_ID.ToArray());
            BCUtility.setComboboxDataSource(cmb_fromAddress, allAdr_ID.ToArray());


            string[] allCycleRunZone = scApp.CycleBLL.loadCycleRunMasterByCurrentCycleTypeID
                                           (scApp.getEQObjCacheManager().getLine().Currnet_Cycle_Type).Select(master => master.ENTRY_ADR_ID).ToArray();
            cmb_cycRunZone.DataSource = allCycleRunZone;


            List <string> lstVh = new List <string>();

            lstVh.Add(string.Empty);
            lstVh.AddRange(scApp.VehicleBLL.loadAllVehicle().Select(vh => vh.VEHICLE_ID).ToList());
            string[] allVh = lstVh.ToArray();
            cmb_Vehicle.DataSource = allVh;
            cmb_Vehicle.AutoCompleteCustomSource.AddRange(allVh);
            cmb_Vehicle.AutoCompleteMode   = AutoCompleteMode.Suggest;
            cmb_Vehicle.AutoCompleteSource = AutoCompleteSource.ListItems;

            cbm_Action.DataSource = Enum.GetValues(typeof(E_CMD_TYPE)).Cast <E_CMD_TYPE>()
                                    .Where(e => e == E_CMD_TYPE.Move ||
                                           e == E_CMD_TYPE.Scan ||
                                           e == E_CMD_TYPE.Load ||
                                           e == E_CMD_TYPE.Unload ||
                                           e == E_CMD_TYPE.LoadUnload).ToList();


            List <string> park_zone_type = scApp.ParkBLL.loadAllParkZoneType();

            cb_parkZoneType.DataSource = park_zone_type;
        }
        private void Raid_PortNameType_CheckedChanged(object sender, EventArgs e)
        {
            string source_name      = string.Empty;
            string destination_name = string.Empty;

            if (Raid_PortNameType_AdrID.Checked)
            {
                source_name      = "From Address";
                destination_name = "To Address";
                BCUtility.setComboboxDataSource(cmb_toAddress, allAdr_ID);
                BCUtility.setComboboxDataSource(cmb_fromAddress, allAdr_ID.ToArray());
            }
            else if (Raid_PortNameType_PortID.Checked)
            {
                source_name      = "From Port";
                destination_name = "To Port";
                BCUtility.setComboboxDataSource(cmb_toAddress, allPortID);
                BCUtility.setComboboxDataSource(cmb_fromAddress, allPortID.ToArray());
            }
            lbl_sourceName.Text      = source_name;
            lbl_destinationName.Text = destination_name;
        }
        //private void m_updateBtn_Click(object sender, EventArgs e)
        private void updateBtn()
        {
            string oldpasswd = SCUtility.Trim(m_oldPwdTxb.Text);
            string passwd    = SCUtility.Trim(m_newPwdTxb.Text);
            string verPasswd = SCUtility.Trim(m_newPwdVerTxb.Text);

            if (!bcApp.SCApplication.UserBLL.checkUserPassword(bcApp.LoginUserID, oldpasswd))                              //A0.01
            {                                                                                                              //A0.01
                MessageBox.Show(this, BCApplication.getMessageString("Please_Check_Old_Password"),                         //A0.01
                                BCApplication.getMessageString("INFO"), MessageBoxButtons.OK, MessageBoxIcon.Information); //A0.01
                return;                                                                                                    //A0.01
            }                                                                                                              //A0.01

            if (SCUtility.isEmpty(passwd) || SCUtility.isEmpty(verPasswd))
            {
                MessageBox.Show(this, BCApplication.getMessageString("Please_Input_New_Password"),
                                BCApplication.getMessageString("INFO"), MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            if (!SCUtility.isMatche(passwd, verPasswd))
            {
                MessageBox.Show(this, BCApplication.getMessageString("Please_Check_New_Password"),
                                BCApplication.getMessageString("INFO"), MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            Boolean updSuccess = bcApp.SCApplication.UserBLL.updatePassword(bcApp.LoginUserID, passwd);

            if (updSuccess)
            {
                //MessageBox.Show(this, BCApplication.getMessageString("UPDATE_SUCCESS"));
                BCUtility.showMsgBox_Info(this, BCApplication.getMessageString("UPDATE_SUCCESS"));
            }
            else
            {
                //MessageBox.Show(this, BCApplication.getMessageString("UPDATE_FAILED"));
                BCUtility.showMsgBox_Info(this, BCApplication.getMessageString("UPDATE_FAILED"));
            }
        }
Beispiel #29
0
        private void AddBtn_Click(object sender, EventArgs e)
        {
            if (!BCUtility.doLogin(this, bcApp, BCAppConstants.FUNC_USER_MANAGEMENT))
            {
                return;
            }
            string user_id   = this.UserIDTbx.Text.Trim();
            string user_name = this.UserNameTbx.Text.Trim();
            string passwd    = this.PswdTbx.Text.Trim();
            string userGrp   = this.userGrpCbx.Text.Trim(); //A0.01
            //A0.03 Boolean isDisable = this.Disable_Y_RBtn.Checked;
            //A0.03 Boolean isPowerUser = this.Power_Y_RBtn.Checked;
            Boolean isDisable = false;   //A0.03

#pragma warning disable CS0219           // 已指派變數 'isPowerUser',但是從未使用過它的值。
            Boolean isPowerUser = false; //A0.03
#pragma warning restore CS0219           // 已指派變數 'isPowerUser',但是從未使用過它的值。

            if (!checkInputDataForAdd())
            {
                return;
            }

            Boolean createSuccess =
                bcApp.SCApplication.UserBLL.createUser(user_id, user_name, passwd, isDisable, userGrp, null, null);  //A0.01
            //A0.01    bcApp.SCApplication.UserBLL.createUser(user_id, user_name, passwd, isDisable, isPowerUser);
            if (createSuccess)
            {
                //MessageBox.Show(this, BCApplication.getMessageString("CREATE_SUCCESS"));
                BCUtility.showMsgBox_Info(this, BCApplication.getMessageString("CREATE_SUCCESS"));
                Refresh();
            }
            else
            {
                //MessageBox.Show(this, BCApplication.getMessageString("CREATE_FAILED"));
                BCUtility.showMsgBox_Info(this, BCApplication.getMessageString("CREATE_FAILED"));
            }
        }
Beispiel #30
0
        private void UpdBtn_Click(object sender, EventArgs e)
        {
            if (!BCUtility.doLogin(this, bcApp, BCAppConstants.FUNC_USER_MANAGEMENT))
            {
                return;
            }

            string  user_id     = this.UserIDTbx.Text.Trim();
            string  user_name   = this.UserNameTbx.Text.Trim();
            string  passwd      = this.PswdTbx.Text.Trim();
            string  user_grp    = this.userGrpCbx.Text.Trim(); //A0.01
            Boolean isDisable   = this.Disable_Y_RBtn.Checked;
            Boolean isPowerUser = this.Power_Y_RBtn.Checked;

            if (!checkInputDataForUpdate())
            {
                return;
            }

            Boolean updateSuccess =
                bcApp.SCApplication.UserBLL.updateUser(user_id, user_name, passwd, isDisable, user_grp, null, null);  //A0.01

            //A0.01     bcApp.SCApplication.UserBLL.updateUser(user_id, user_name, passwd, isDisable, isPowerUser);

            if (updateSuccess)
            {
                //MessageBox.Show(this, BCApplication.getMessageString("UPDATE_SUCCESS"));
                BCUtility.showMsgBox_Info(this, BCApplication.getMessageString("UPDATE_SUCCESS"));
                Refresh();
            }
            else
            {
                //MessageBox.Show(this, BCApplication.getMessageString("UPDATE_FAILED"));
                BCUtility.showMsgBox_Info(this, BCApplication.getMessageString("UPDATE_FAILED"));
            }
        }