Ejemplo n.º 1
0
        private void AlertForItemPrice()
        {
            String ItemName = null;
            // DateTime CurrentDate;
            CPriceMasterBO oPriceMasterBO     = new CPriceMasterBO();
            CResult        oResultPriceMaster = new CResult();
            CPriceMaster   oPriceMaster       = new CPriceMaster();

            oResultPriceMaster = oPriceMasterBO.ReadAllForAlert();
            if (oResultPriceMaster.IsSuccess)
            {
                DataTable dt = oResultPriceMaster.Data as DataTable;
                foreach (DataRow dr in dt.Rows)
                {
                    oPriceMaster.Price_ToDate   = DateTime.Parse(dr["Price_ToDate"].ToString());        //ToString("dd-MM-yy");
                    oPriceMaster.Price_ItemOId  = dr["Price_ItemOId"].ToString();
                    oPriceMaster.Price_ItemName = dr["ItemName"].ToString();
                    // if (oPriceMaster.Price_ToDate < CurrentDate)

                    ItemName = ItemName + oPriceMaster.Price_ItemName.ToString() + "\n";
                }
            }
            if (ItemName != null)
            {
                frmPopup ofrmPopUp = new frmPopup(PopupSkins.AlertSkin);
                ofrmPopUp.ShowPopup("Price Update!!", "Price Should Be Updated Following Items-" + ItemName + "", 500, 10000, 500);
            }
        }
Ejemplo n.º 2
0
        private void CommandReceived(object sender, CommandEventArgs e)
        {
            var msg = string.Empty;

            switch (e.Command.CommandType)
            {
            case CommandType.UserAlreadyExists:
                msg = "The User name is already exists !";
                break;

            case CommandType.InvalidCredentials:
                msg = "Inavlid User name and/or Password !";
                break;

            case CommandType.UserAlreadyConnected:
                msg = "The User name is already connected !";
                break;

            case CommandType.ValidCredentials:
                _canClose = true;
                Close();
                break;
            }

            if (e.Command.CommandType != CommandType.ValidCredentials)
            {
                frmPopup popup = new frmPopup(PopupSkins.SmallInfoSkin);
                popup.ShowPopup("Error", msg, 300, 2000, 2000);
                _client.Disconnect();
                SetEnablity(true);
            }
        }
Ejemplo n.º 3
0
        void CommandReceived(object sender, Project.CommandClient.CommandEventArgs e)
        {
            if (e.Command.CommandType == Project.CommandClient.CommandType.IsNameExists)
            {
                if (e.Command.MetaData.ToLower() == "true")
                {
                    frmPopup popup = new frmPopup(PopupSkins.SmallInfoSkin);
                    popup.ShowPopup("Error", "The Username is already exists !", 300, 2000, 2000);
                    this.client.Disconnect();
                    this.SetEnablity(true);
                }
                else
                {
                    this.canClose = true;
                    this.Close();
                }
            }

            if (e.Command.CommandType == Project.CommandClient.CommandType.LoginSuccessful)
            {
                this.IsLoginSuccessful         = true;
                this.MessageRecievedFromServer = e.Command.MetaData;
            }
            if (e.Command.CommandType == Project.CommandClient.CommandType.LoginUnsuccessful)
            {
                this.IsLoginSuccessful         = false;
                this.MessageRecievedFromServer = e.Command.MetaData;
            }
        }
Ejemplo n.º 4
0
        public UserExceptions(HMConnection.HMCon Connection, TUC_HMDevXManager.TUC_HMDevXManager DevXMgr, int AlertPointID)
        {
            this.Connection   = Connection;
            this.DevXMgr      = DevXMgr;
            this.AlertPointID = AlertPointID;
            Popup             = new frmPopup(DevXMgr);
            InitializeComponent();
            TR_Conn.ConnectionString  = this.Connection.TRConnection;
            WEB_Conn.ConnectionString = this.Connection.WebConnection;

            string sSelect = "select isnull(alert,'') from ApplicationAlertPoint where id=" + AlertPointID;

            this.Text = "Alert: " + Connection.SQLExecutor.ExecuteScalar(sSelect, Connection.TRConnection);

            daUser.SelectCommand.CommandText = "SELECT u.NAME, d.DESCRIPTION " +
                                               "FROM MLUSER u " +
                                               "LEFT OUTER JOIN DEPARTMENT d ON d.NAME = u.DEPARTMENT " +
                                               "where u.name not in ( select mluser from AlertPointAccess where AAP_ID=" + AlertPointID + " ) " +
                                               "ORDER BY d.DESCRIPTION, u.NAME";

            daExceptions.SelectCommand.Parameters["@aap_id"].Value = AlertPointID;
            daExceptions.Fill(dsExceptions1);
            daDepartment.Fill(dsDepartment1);
            daUser.Fill(dsUser1);
            daUserDep.Fill(dsUserDep1);
        }
Ejemplo n.º 5
0
 public frmAppDec(HMCon Connection, TUC_HMDevXManager.TUC_HMDevXManager DevXMgr)
 {
     this.Connection = Connection;
     this.DevXMgr    = DevXMgr;
     Popup           = new frmPopup(DevXMgr);
     InitializeComponent();
 }
Ejemplo n.º 6
0
        private void client_ConnectingFailed(object sender, EventArgs e)
        {
            frmPopup popup = new frmPopup(PopupSkins.SmallInfoSkin);

            popup.ShowPopup("Error", "Server Is Not Accessible !", 200, 2000, 2000);
            this.SetEnablity(true);
        }
Ejemplo n.º 7
0
        public void Init(HMCon con, TUC_HMDevXManager.TUC_HMDevXManager hmDevMgr, GridView gv, List <IMapLayer> layers, List <PosGenerator> posGens)
        {
            _hmCon          = con;
            _hmDevMgr       = hmDevMgr;
            _gv             = gv;
            _layers         = layers;
            _posGens        = posGens;
            linkGen.Enabled = _posGens != null;

            _pop = new frmPopup(_hmDevMgr);

            if (!ArcGISRuntimeEnvironment.IsInitialized)
            {
                try
                {
                    //ArcGISRuntimeEnvironment.InstallPath = Application.StartupPath;
                    ArcGISRuntimeEnvironment.ClientId = "EdzP18VEt80l7prT";
                    ArcGISRuntimeEnvironment.Initialize();
                }
                catch (Exception ex)
                {
                    _pop.ShowPopup($"Unable to initialize the ArcGIS Runtime with the client ID provided: {ex.Message}");
                }
            }

            _hmDevMgr.FormInit(this);
        }
Ejemplo n.º 8
0
 public ManagementBoard(HMCon Connection, TUC_HMDevXManager.TUC_HMDevXManager DevXMgr)
 {
     this.Connection = Connection;
     this.DevXMgr    = DevXMgr;
     Popup           = new frmPopup(DevXMgr);
     InitializeComponent();
     RunSetups();
 }
Ejemplo n.º 9
0
        public static PopupResult ShowMessage(string text, string caption, PopupType buttons)
        {
            if (_frmPopup == null)
            {
                _frmPopup = new frmPopup(GuiCommon.HMDevXManager);
            }

            return(_frmPopup.ShowPopup(text, caption, buttons));
        }
Ejemplo n.º 10
0
        public static void ShowMessage(string msg)
        {
            if (_frmPopup == null)
            {
                _frmPopup = new frmPopup(GuiCommon.HMDevXManager);
            }

            _frmPopup.ShowPopup(msg);
        }
Ejemplo n.º 11
0
 public ucAPPaymentRequest(HMCon Connection, TUC_HMDevXManager.TUC_HMDevXManager DevXMgr, KeyControlAccess.Validator KCA_Validator)
 {
     this.Connection    = Connection;
     this.DevXMgr       = DevXMgr;
     this.KCA_Validator = KCA_Validator;
     Popup = new frmPopup(DevXMgr);
     InitializeComponent();
     RunSetups();
 }
Ejemplo n.º 12
0
        public ucDrawBase(HMCon con, TUC_HMDevXManager.TUC_HMDevXManager hmDevMgr, WpfMapDrawBase map)
        {
            _hmCon    = con;
            _hmDevMgr = hmDevMgr;
            _pop      = new frmPopup(hmDevMgr);
            _map      = map;

            _attrTable = new DataTable();
            _attrTable.Columns.Add(new DataColumn("Attribute"));
            _attrTable.Columns.Add(new DataColumn("Value"));
        }
Ejemplo n.º 13
0
 private void LoginToServer()
 {
     if (this.txtUsetName.Text.Trim() == "")
     {
         frmPopup popup = new frmPopup(PopupSkins.SmallInfoSkin);
         popup.ShowPopup("Error", "Username is empty !", 1000, 2000, 2000);
         this.SetEnablity(true);
     }
     else
     {
         this.client.NetworkName = this.txtUsetName.Text.Trim();
         this.client.ConnectToServer();
     }
 }
Ejemplo n.º 14
0
 private void CommandReceived(object sender, CommandEventArgs e)
 {
     if (e.Command.CommandType == CommandType.RoomAlreadyExists)
     {
         frmPopup popup = new frmPopup(PopupSkins.SmallInfoSkin);
         popup.ShowPopup("Error", "The Room name is already exists !", 300, 2000, 2000);
         SetEnablity(true);
     }
     else if (e.Command.CommandType == CommandType.RoomCreated)
     {
         _created  = true;
         _canClose = true;
         Close();
     }
 }
Ejemplo n.º 15
0
        public WpfMapBase(TUC_HMDevXManager.TUC_HMDevXManager hmDevMgr)
        {
            InitializeComponent();
            _hmDevMgr = hmDevMgr;
            _pop      = new frmPopup(_hmDevMgr);

            _baseMaps.Add("Open Street", "OpenStreetMap");
            _baseMaps.Add("Streets", "http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer");
            _baseMaps.Add("Topo", "http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer");
            _baseMaps.Add("Imagery", "http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer");
            _baseMaps.Add("National Geographic", "http://services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer");

            basemapChooser.ItemsSource       = _baseMaps;
            basemapChooser.DisplayMemberPath = "Key";
            basemapChooser.SelectedIndex     = 0;
        }
Ejemplo n.º 16
0
 private void deleteToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (listViewMessage.SelectedItems.Count > 0)
     {
         var index = listViewMessage.Items.IndexOf(listViewMessage.SelectedItems[0]);
         if (_client.UserName.Equals(_messages[index].User))
         {
             // Delete only your own messages !
             _client.SendCommand(new CommandContainer(CommandType.RemoveMessage, new MessageContainer(_messages[index])));
         }
         else
         {
             frmPopup popup = new frmPopup(PopupSkins.SmallInfoSkin);
             popup.ShowPopup("Info", "You can only remove your own messages !", 200, 2000, 2000);
         }
     }
 }
Ejemplo n.º 17
0
        public void Init(HMCon con, TUC_HMDevXManager.TUC_HMDevXManager hmDevMgr, List <DataRow> rowList, List <IMapLayer> layers)
        {
            _hmCon    = con;
            _hmDevMgr = hmDevMgr;
            _layers   = layers;
            _pop      = new frmPopup(_hmDevMgr);

            foreach (var layer in _layers)
            {
                var         page   = tabControl.TabPages.Add(layer.LayerName);
                ucMapImport import = new ucMapImport();
                import.Init(_hmCon, _hmDevMgr, rowList, layer);
                import.Parent = page;
                import.Dock   = DockStyle.Fill;
                tabControl.TabPages.Add(page);
            }
        }
Ejemplo n.º 18
0
 void CommandReceived(object sender, Proshot.CommandClient.CommandEventArgs e)
 {
     if (e.Command.CommandType == Proshot.CommandClient.CommandType.IsNameExists)
     {
         if (e.Command.MetaData.ToLower() == "true")
         {
             frmPopup popup = new frmPopup(PopupSkins.SmallInfoSkin);
             popup.ShowPopup("Error", "The Username is already exists !", 300, 2000, 2000);
             this.client.Disconnect();
             this.SetEnablity(true);
         }
         else
         {
             this.canClose = true;
             this.Close();
         }
     }
 }
Ejemplo n.º 19
0
 void CommandReceived(object sender, CommandEventArgs e)
 {
     if (e.Command.CommandType == CommandType.IsNameExists)
     {
         if (e.Command.MetaData.ToLower() == "true")
         {
             var popup = new frmPopup(PopupSkins.SmallInfoSkin);
             popup.ShowPopup("Error", "The Username is already exists !", 300, 2000, 2000);
             Client.Disconnect();
             SetEnablity(true);
         }
         else
         {
             _canClose = true;
             Close();
         }
     }
 }
Ejemplo n.º 20
0
        public Administration(HMConnection.HMCon Connection, TUC_HMDevXManager.TUC_HMDevXManager DevXMgr)
        {
            this.Connection = Connection;
            this.DevXMgr    = DevXMgr;
            Popup           = new frmPopup(DevXMgr);

            sSQL_AlertPointSelect = sSQL_AlertPointSelect.Replace("web_db", Connection.WebDB);
            InitializeComponent();

            daAlertPoint.SelectCommand.CommandText = sSQL_AlertPointSelect;

            TR_Conn.ConnectionString  = this.Connection.TRConnection;
            WEB_Conn.ConnectionString = this.Connection.WebConnection;

            daAlertPoint.Fill(dsAlertPoint1);
            daModule.Fill(dsModule1);
            gvAlert.CollapseAllGroups();
        }
Ejemplo n.º 21
0
        /// <summary>
        /// Popup Form을 생성합니다.
        /// </summary>
        /// <param name="text">Form Text</param>
        /// <param name="ds">Code 값으로 사용할 DataSet(없으면 null)</param>
        /// <returns>[0] : 사유, [1] : 코드 (Length가 0 보다 큰지 Check 해야 한다.)</returns>
        public string[] ExecutePopup(string text, DataSet ds)
        {
            List <string> values = new List <string>();

            using (frmPopup fPopup = new frmPopup(localizer)
            {
                Text = text, CodeDataSet = ds
            })
            {
                if (fPopup.ShowDialog(this) != DialogResult.OK)
                {
                    return(values.ToArray());
                }

                values.Add(fPopup.Description);
                values.Add(fPopup.CodeValue);
            }

            return(values.ToArray());
        }
Ejemplo n.º 22
0
        private void AlertForItemShortage()
        {
            CReorderLevelBO oReorderLevelBO     = new CReorderLevelBO();
            CResult         oResultReorderLevel = new CResult();
            CReorderLevel   oReorderLevel       = new CReorderLevel();
            String          ItemName            = null;

            oResultReorderLevel = oReorderLevelBO.ReadAllReorderLevelData(oReorderLevel);
            if (oResultReorderLevel.IsSuccess)
            {
                foreach (CReorderLevel obj in oResultReorderLevel.Data as ArrayList)
                {
                    oReorderLevel.Quantity = obj.Quantity;

                    CInventoryBO oInventoryBO     = new CInventoryBO();
                    CResult      oResultInventory = new CResult();
                    CInventory   oInventory       = new CInventory();
                    oInventory.Invt_BranchOID = obj.Branch_ID;
                    oInventory.Invt_LocOID    = obj.Location_ID;
                    oInventory.Invt_ItemOID   = obj.Item_ID;
                    oResultInventory          = oInventoryBO.ReadForROL(oInventory);
                    if (oResultInventory.IsSuccess)
                    {
                        foreach (CInventory oInv in oResultInventory.Data as ArrayList)
                        {
                            if (int.Parse(oInv.Invt_QTY.ToString()) < int.Parse(oReorderLevel.Quantity.ToString()))
                            {
                                ItemName = ItemName + oInv.Invt_ItemName.ToString() + "\n";
                                // MessageBox.Show("Item", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                            }
                        }
                    }
                }
                //MessageBox.Show("Shortage Of Following Items "+ItemName+"", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                if (ItemName != null)
                {
                    frmPopup ofrmPopUp = new frmPopup(PopupSkins.AlertSkin);
                    ofrmPopUp.ShowPopup("Item Shortage!!", "Shortage Of Following Items-" + ItemName + "", 500, 2000, 500);
                }
            }
        }
Ejemplo n.º 23
0
 private void LoginToServer()
 {
     if (txtUserName.Text.Trim() == "")
     {
         frmPopup popup = new frmPopup(PopupSkins.SmallInfoSkin);
         popup.ShowPopup("Error", "Username is empty !", 1000, 2000, 2000);
         SetEnablity(true);
     }
     else if (txtPassword.Text.Trim() == "")
     {
         frmPopup popup = new frmPopup(PopupSkins.SmallInfoSkin);
         popup.ShowPopup("Error", "Password is empty !", 1000, 2000, 2000);
         SetEnablity(true);
     }
     else
     {
         _client.UserName = txtUserName.Text.Trim();
         _client.Password = txtPassword.Text.Trim();
         _client.ConnectToServer();
     }
 }
Ejemplo n.º 24
0
 private void SendRoomInfoToServer()
 {
     if (txtRoomName.Text.Trim() == "")
     {
         frmPopup popup = new frmPopup(PopupSkins.SmallInfoSkin);
         popup.ShowPopup("Error", "Room name is empty !", 1000, 2000, 2000);
         SetEnablity(true);
     }
     else if (txtRoomDescription.Text.Trim() == "")
     {
         frmPopup popup = new frmPopup(PopupSkins.SmallInfoSkin);
         popup.ShowPopup("Error", "Room description is empty !", 1000, 2000, 2000);
         SetEnablity(true);
     }
     else
     {
         _roomName        = txtRoomName.Text.Trim();
         _roomDescription = txtRoomDescription.Text.Trim();
         var cmd = new CommandContainer(CommandType.CreateRoom, new RoomContainer(_roomName, _roomDescription));
         _client.SendCommand(cmd);
     }
 }
Ejemplo n.º 25
0
        private void mniSignup_Click(object sender, EventArgs e)
        {
            LoginFrm dlg = new LoginFrm(_serverIpv4, _serverPort, false);

            dlg.ShowDialog();
            if (_client != null)
            {
                if (_client.Connected)
                {
                    frmPopup popup = new frmPopup(PopupSkins.SmallInfoSkin);
                    popup.ShowPopup("Warning", string.Format("Disconnected user {0} !", _client.UserName), 300, 2000, 2000);
                    _client.SendCommand(new CommandContainer(CommandType.ClientLogOff, new ProfileContainer(_client.UserName, _client.Password)));
                }
                Text = "Offline";
                _client.Disconnect();
                lstViwUsers.Items.Clear();
                ClearRoomItems();
                CloseRooms();
            }
            _client = dlg.Client;

            if (_client.Connected)
            {
                _client.CommandReceived += new CommandReceivedEventHandler(client_CommandReceived);
                _client.SendCommand(new CommandContainer(CommandType.RequestClientList, null));
                _client.SendCommand(new CommandContainer(CommandType.RequestRoomList, null));
                Text                        = "Online : " + _client.UserName;
                mniEnter.Text               = "Log Off";
                mniCreateRoom.Enabled       = true;
                mniConnectMyProfile.Enabled = true;
            }
            else
            {
                _client = null;
            }
        }
Ejemplo n.º 26
0
 private void LoginToServer()
 {
     if (txtUsetName.Text.Trim() == "")
     {
         var popup = new frmPopup(PopupSkins.SmallInfoSkin);
         popup.ShowPopup("Error", "Username is empty !", 1000, 2000, 2000);
         SetEnablity(true);
     }
     else
     {
         Client.NetworkName = txtUsetName.Text.Trim();
         Client.ConnectToServer();
     }
 }
Ejemplo n.º 27
0
        private void frmGerarXmlNfe_Load(object sender, EventArgs e)
        {
            try
            {
                foreach (Control ctl in this.Controls)
                {
                    if ((ctl) is MdiClient)
                    {
                        ctl.BackColor = Color.White;
                        break;
                    }
                }
                if (ApplicationDeployment.IsNetworkDeployed)
                {
                    ApplicationDeployment ad = ApplicationDeployment.CurrentDeployment;
                    lblVersao.Text = "Versão Atual: " + ad.CurrentVersion.ToString();
                    belStatic.sVersaoAtual = ad.CurrentVersion.ToString();
                    belVersionamento objbelVersion = new belVersionamento();
                    if (objbelVersion.VerificaPublicacaoDisponivel())
                    {
                        frmPopup popup = new frmPopup(PopupSkins.InfoSkin);
                        popup.ShowPopup("Atualização", "Uma nova versão do Sistema já está Disponível!", 200, 4000, 2000);
                        tsAtualizacao.Visible = true;
                    }
                    else
                    {
                        tsAtualizacao.Visible = false;
                    }
                    versãoHlpToolStripMenuItem.Visible = false;
                }

                //Carrega os arquivos de configuração
                if (!Util.VerificaConfiguracaoPastasXml())
                {
                    frmLocalXml objfrm = new frmLocalXml("");
                    objfrm.ShowDialog();
                }
                else
                {
                    DirectoryInfo dinfo = new DirectoryInfo(belStatic.Pasta_xmls_Configs);
                    if (!dinfo.Exists)
                    {
                        KryptonMessageBox.Show(null, "O caminho configurado abaixo não foi encontrado!! "
                            + Environment.NewLine
                            + Environment.NewLine
                            + belStatic.Pasta_xmls_Configs, "A V I S O", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        frmLocalXml objfrm = new frmLocalXml(belStatic.Pasta_xmls_Configs);
                        objfrm.ShowDialog();
                    }
                }

                int iCountFiles = 0;
                DirectoryInfo dPastaData = new DirectoryInfo(belStatic.Pasta_xmls_Configs);
                if (!dPastaData.Exists)
                {
                    dPastaData.Create();
                }
                else
                {
                    FileInfo[] finfo = dPastaData.GetFiles("*.xml");
                    foreach (FileInfo item in finfo)
                    {
                        iCountFiles++;
                    }
                }


                belStatic.IPrimeiroLoad = 1;
                if (iCountFiles != 0)
                {
                    frmSelecionaConfigs objFrmSeleciona = new frmSelecionaConfigs();
                    objFrmSeleciona.ShowDialog();
                    if (objFrmSeleciona.bFecharApp)
                    {
                        throw new Exception("Fechar");
                    }
                    if (!objFrmSeleciona.bESCRITA)
                    {
                        objFrmSeleciona.Hide();
                        belStatic.IPrimeiroLoad = 1;
                        frmLogin objfrm = new frmLogin();
                        objfrm.ShowDialog();
                        CarregaDadosEmpresa();
                        VerificaAcessoUserEmprersa(sender, e);
                        belStatic.IPrimeiroLoad = 0;
                        lblUsuario.Text = "Usuário: " + belStatic.SUsuario;
                        lblEmpresa.Text = belStatic.sNomeEmpresa;
                        gerarAquivosXmlsToolStripMenuItem.Visible = true;
                        tsNfe.Enabled = true;
                        tsNfes.Enabled = true;
                        headerMenuLateral.Visible = true;
                        cx = new belConnection();
                    }
                    else
                    {
                        gerarAquivosXmlsToolStripMenuItem.Visible = false;
                        tsNfe.Enabled = false;
                        tsNfes.Enabled = false;
                        headerMenuLateral.Visible = false;
                    }

                }
                else
                {
                    if (KryptonMessageBox.Show(null, "Não existe nenhum arquivo de configuração na pasta Selecionada."
                         + Environment.NewLine
                         + Environment.NewLine
                         + "Deseja selecionar uma outra Pasta ?",
                         "A V I S O",
                         MessageBoxButtons.YesNo,
                         MessageBoxIcon.Question) == DialogResult.Yes)
                    {
                        frmLocalXml objfrm = new frmLocalXml(belStatic.Pasta_xmls_Configs);
                        objfrm.ShowDialog();
                        Application.Restart();
                        this.Close();
                    }


                    belStatic.BSemArquivo = true;
                    frmLoginConfig objFrm = new frmLoginConfig();
                    objFrm.ShowDialog();

                    lblUsuario.Text = "   Usuário : " + belStatic.SUsuario;
                }
                CarregaStatuModoSistema();

                //carrega Logotipo
                Globais LeRegWin = new Globais();
                LeRegWin.CarregaInfStaticas(); // INICIALIZA AS CONFIGURAÇÕES PADRÕES
                Byte[] bimagem = belUtil.carregaImagem(LeRegWin.LeRegConfig("Logotipo"));

                if (bimagem != null)
                {
                    pictureBox1.BackgroundImage = belUtil.byteArrayToImage(bimagem);
                }

                HLP.Dao.daoEmailContador objdaoemailCont = new HLP.Dao.daoEmailContador();
                if (objdaoemailCont.VerificaDiaParaEnviarEmail())
                {
                    try
                    {
                        KryptonMessageBox.Show("Hoje é dia de enviar Email para o Contador, Verifique suas Pendências!!", "A V I S O", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        NfeGerarXml.NFe.frmEmailContadorNfe objfrm = new NfeGerarXml.NFe.frmEmailContadorNfe();
                        objfrm.MdiParent = this;
                        objfrm.Show();
                    }
                    catch (Exception ex)
                    {
                        KryptonMessageBox.Show(null, ex.Message, "A V I S O", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }

                }

                if (belStatic.RAMO == "TRANSPORTE")
                {
                    btnNfe.Enabled = false;
                    tsNfe.Enabled = false;

                    btnNfes.Enabled = false;
                    tsNfes.Enabled = false;

                    btnCte.Enabled = true;
                    tsCte.Enabled = true;

                    btnCce.Enabled = false;
                    tsCce.Enabled = false;

                    //btnEmail.Enabled = false;
                    //tsEmail.Enabled = false;

                    tsOrganizarPasta.Enabled = false;
                    tsProtocolos.Enabled = false;
                    tsImportarXmlEscritor.Enabled = false;
                }
                else
                {
                    btnNfe.Enabled = true;
                    tsNfe.Enabled = true;

                    btnNfes.Enabled = true;
                    tsNfes.Enabled = true;

                    btnCte.Enabled = false;
                    tsCte.Enabled = false;

                    btnCce.Enabled = true;
                    tsCce.Enabled = true;

                    btnEmail.Enabled = true;
                    tsEmail.Enabled = true;

                    tsOrganizarPasta.Enabled = true;
                    tsProtocolos.Enabled = true;
                    tsImportarXmlEscritor.Enabled = true;
                }




            }
            catch (FbException fbx)
            {
                KryptonMessageBox.Show(null, "Ocorreu uma falha ao montar a string de Conexão!"
                    + Environment.NewLine
                    + "Verifique se o arquivo está configurado corretamente!"
                    + Environment.NewLine,
                    "A V I S O", MessageBoxButtons.OK, MessageBoxIcon.Information);
                frmLocalXml objfrm = new frmLocalXml(belStatic.Pasta_xmls_Configs);

                frmLoginConfig objFrm = new frmLoginConfig();
                objFrm.ShowDialog();
                lblUsuario.Text = "   Usuário : " + belStatic.SUsuario;
                Application.Restart();

            }
            catch (Exception ex)
            {
                if (ex.Message.Equals("Fechar"))
                {
                    this.Close();
                }
                else
                {
                    KryptonMessageBox.Show(ex.Message);
                }
            }
        }
Ejemplo n.º 28
0
        public void Init(HMCon con, TUC_HMDevXManager.TUC_HMDevXManager hmDevMgr, List <DataRow> rowList, IMapLayer layer)
        {
            _hmCon    = con;
            _hmDevMgr = hmDevMgr;
            _layer    = layer;
            _pop      = new frmPopup(_hmDevMgr);

            labelTableName.Text   = _layer.LinkTable;
            labelFieldName.Text   = layer.LinkColumn;
            labelFeatureName.Text = layer.LayerName;

            _table = new DataTable();
            _table.Columns.Add(new DataColumn(ColumnNames.Key));
            _table.PrimaryKey = new DataColumn[] { _table.Columns[ColumnNames.Key] };
            layer.Attributes.ToList().ForEach(attr => _table.Columns.Add(new DataColumn(attr.DisplayName)));
            _table.Columns.Add(new DataColumn(ColumnNames.OldData));
            _table.Columns.Add(new DataColumn(ColumnNames.NewData));
            _table.Columns.Add(new DataColumn(ColumnNames.Action));

            foreach (var srcRow in rowList)
            {
                var row = _table.NewRow();

                row[ColumnNames.Key] = srcRow[layer.LinkColumn];
                layer.Attributes.ToList().ForEach(attr => row[attr.DisplayName] = attr.LinkDictionary?[$"{srcRow[attr.LinkField]}"] ?? srcRow[attr.LinkField]);
                _table.Rows.Add(row);
            }

            try
            {
                if (rowList.Count > 0)
                {
                    string linkCodeList = MapData.GetContentListString(rowList, layer.LinkColumn);
                    string sql          = "";
                    if (layer is MapEventLayer)
                    {
                        sql = $"select * from Geo_Event where EventTypeId={layer.ConvertTo<MapEventLayer>().TypeId} and LinkCode in ({linkCodeList})";
                    }
                    else
                    {
                        sql = $"select * from Geo_Link where LinkTableName='{layer.LinkTable}' and Feature='{layer.LayerName}' and LinkCode in ({linkCodeList})";
                    }
                    var linkTable = _hmCon.SQLExecutor.ExecuteDataAdapter(sql, _hmCon.TRConnection);
                    _table.Select().ToList().ForEach(row => row[ColumnNames.OldData] = linkTable.Select($"LinkCode='{row[ColumnNames.Key]}'").Length > 0 ? strYes : string.Empty);
                    _table.Select().ToList().ForEach(row => row[ColumnNames.Action]  = ImportAction.Ignore);
                }
            }
            catch (Exception ex)
            {
                _pop.ShowPopup($"Error in loading: {ex.Message}");
            }

            gc.DataSource = _table;

            _luAllAction            = new RepositoryItemLookUpEdit();
            _luAllAction.DataSource = new string[] { ImportAction.Ignore, ImportAction.Add, ImportAction.Overwrite, ImportAction.Delete };
            gc.RepositoryItems.Add(_luAllAction);
            gv.Columns["Action"].ColumnEdit = _luAllAction;

            gv.Columns.ToList().ForEach(col => col.OptionsColumn.AllowEdit = col.FieldName == ColumnNames.Action);

            _luAction = new RepositoryItemLookUpEdit();
        }
Ejemplo n.º 29
0
        public void Init(HMCon con, TUC_HMDevXManager.TUC_HMDevXManager hmDevMgr, List <DataRow> rowList, List <IMapLayer> layers)
        {
            _hmCon    = con;
            _hmDevMgr = hmDevMgr;
            _layers   = layers;
            _pop      = new frmPopup(_hmDevMgr);

            _map       = new WpfMapDrawBase(_hmDevMgr);
            host.Child = _map;

            _data = new Dictionary <int, List <IGeoInfo> >();
            DrawTabFactory factory = new DrawTabFactory();

            for (int i = 0; i < layers.Count; i++)
            {
                try
                {
                    _map.RegisterLayer(i, layers[i]);
                    ucDrawBase ucDraw = factory.CreateInstance(con, hmDevMgr, _map, layers[i], i);
                    if (ucDraw != null)
                    {
                        ucDraw.DrawingStatusChanged += SetDrawingMode;
                        if (ucDraw is ucDrawEvents)
                        {
                            ucDraw.ConvertTo <ucDrawEvents>().EventTypeChanged += FrmMapDraw_EventTypeChanged;
                            ucDraw.ConvertTo <ucDrawEvents>().MarkerChanged    += _map.EventMarkerChanged;
                            _map.PointTapped += ucDraw.ConvertTo <ucDrawEvents>().SetPoint;
                        }
                        else if (ucDraw is ucDrawShape)
                        {
                            _map.ItemTapped += ucDraw.ConvertTo <ucDrawShape>().SetItem;
                        }
                        else if (ucDraw is ucDrawLine)
                        {
                            _map.ItemTapped += ucDraw.ConvertTo <ucDrawLine>().SetItem;
                        }

                        var page = tabControl.TabPages.Add(layers[i] is MapEventLayer ? "Event" : layers[i].LayerName);
                        ucDraw.Parent = page;
                        ucDraw.Dock   = DockStyle.Fill;
                    }

                    _data.Add(i, MapData.GetDataList(con, rowList, layers[i]));
                }
                catch (ConstraintException ex)
                {
                    _pop.ShowPopup($"Error in loading {layers[i].LinkTable}: {ex.Message}");
                }
            }

            DataTable dataTable = new DataTable();

            dataTable.Columns.Add(new DataColumn("#"));
            foreach (var layer in layers)
            {
                layer.Attributes.ToList().ForEach(attr => {
                    if (dataTable.Columns.IndexOf(attr.LinkField) == -1)
                    {
                        DataColumn col = new DataColumn(attr.LinkField);
                        col.Caption    = attr.DisplayName;
                        dataTable.Columns.Add(col);
                    }
                });
            }

            foreach (var srcRow in rowList)
            {
                var row = dataTable.NewRow();

                foreach (var layer in layers)
                {
                    row["#"] = srcRow[layer.LinkColumn];
                    layer.Attributes.ToList().ForEach(attr => row[attr.LinkField] = attr.LinkDictionary?[$"{srcRow[attr.LinkField]}"] ?? srcRow[attr.LinkField]);
                }
                dataTable.Rows.Add(row);
            }

            gc.DataSource = dataTable;

            InDrawingStatus(false);
        }
Ejemplo n.º 30
0
 private void client_ConnectingFailed(object sender, EventArgs e)
 {
     var popup = new frmPopup(PopupSkins.SmallInfoSkin);
     popup.ShowPopup("Error", "Server Is Not Accessible !", 200, 2000, 2000);
     SetEnablity(true);
 }