Exemplo n.º 1
0
        private void frmLogin_Load(object sender, EventArgs e)
        {
            // Obtener el ID del nodo del archivo de configuración
            _intNodeId = int.Parse(Common.Utils.GetApplicationConfigValue("NodeId"));

            // Leer el nodo
            NodeBL          objNodeBL          = new NodeBL();
            OperationResult objOperationResult = new OperationResult();
            nodeDto         objNodeDto         = objNodeBL.GetNodeByNodeId(ref objOperationResult, _intNodeId);

            if (objOperationResult.Success == 1)
            {
                // Mostrar el nombre del nodo
                txtNode.Text = objNodeDto.v_Description;
            }
            else
            {
                MessageBox.Show(objOperationResult.ExceptionMessage, "Error al conectarse a Base de Datos !!", MessageBoxButtons.OK, MessageBoxIcon.Error);

                btnOK.Enabled       = false;
                txtUserName.Enabled = false;
                txtPassword.Enabled = false;

                this.Close();
            }
        }
Exemplo n.º 2
0
        private void frmLogin_Load(object sender, EventArgs e)
        {
            OperationResult objOperationResult = new OperationResult();

            ////----------------------------------------------------------------------------------------------------------------
            //bool Validador = false;
            //string[] Serial = new string[]
            //{
            //    "E63B2796",
            //    "2443F7CC"
            //};

            // string MAC1 =   SerieDD();
            //foreach (var item in Serial)
            //{
            //    if (item == MAC1)
            //    {
            //        Validador = true;
            //    }
            //}


            //if (Validador != true)
            //{
            //    MessageBox.Show(objOperationResult.ExceptionMessage, "Error al conectarse a Base de Datos !!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            //    this.Close();
            //}

            ////----------------------------------------------------------------------------------------------------------------

            // Obtener el ID del nodo del archivo de configuración
            _intNodeId = int.Parse(Common.Utils.GetApplicationConfigValue("NodeId"));
            string MAC = Common.Utils.GetApplicationConfigValue("ClientSettingsProviderx");

            // Leer el nodo
            NodeBL objNodeBL = new NodeBL();

            nodeDto objNodeDto = objNodeBL.GetNodeByNodeId(ref objOperationResult, _intNodeId);

            if (objOperationResult.Success == 1)
            {
                // Mostrar el nombre del nodo
                txtNode.Text = objNodeDto.v_Description;
            }
            else
            {
                MessageBox.Show(objOperationResult.ExceptionMessage, "Error al conectarse a Base de Datos !!", MessageBoxButtons.OK, MessageBoxIcon.Error);

                btnOK.Enabled       = false;
                txtUserName.Enabled = false;
                txtPassword.Enabled = false;

                this.Close();
            }
        }
Exemplo n.º 3
0
        private void txtCriterio_TextChanged(object sender, EventArgs e)
        {
            OperationResult objOperationResult = new OperationResult();
            int             nodeId             = 0;

            if (Globals.ClientSession != null)
            {
                nodeId = Globals.ClientSession.i_CurrentExecutionNodeId;
            }

            nodeDto node = _nodeBL.GetNodeByNodeId(ref objOperationResult, nodeId);

            _pharmacyWarehouseId = node.v_PharmacyWarehouseId;

            if (node != null)
            {
                _keyValueDTO = BLL.Utils.GetProductWarehouse(ref objOperationResult, "Value2==" + "\"" + _pharmacyWarehouseId + "\"" + "&&" + "Value1.Contains(\"" + txtProductSearch.Text.Trim() + "\")");
                Utils.LoadDropDownList(cbMedicamento, "Value1", "Id", _keyValueDTO, DropDownListAction.Select);
            }
        }
Exemplo n.º 4
0
        private void LoadData()
        {
            if (Mode == "New")
            {
                // Additional logic here.
            }
            else if (Mode == "Edit")
            {
                OperationResult objCommonOperationResultedit = new OperationResult();
                nodeDto         objNodeDTO = _objNodeBL.GetNodeByNodeId(ref objCommonOperationResultedit, NodeId);

                Session["sobjNodeDTO"] = objNodeDTO;

                // Informacion del nodo
                txtDescription.Text                 = objNodeDTO.v_Description;
                txtGeografyLocationId.Text          = objNodeDTO.v_GeografyLocationId;
                txtGeografyLocationDescription.Text = objNodeDTO.v_GeografyLocationDescription;
                ddlNodeType.SelectedValue           = objNodeDTO.i_NodeTypeId.ToString();
                dpBeginDate.SelectedDate            = objNodeDTO.d_BeginDate;
                dpEndDate.SelectedDate              = objNodeDTO.d_EndDate;
            }
        }
Exemplo n.º 5
0
        private void frmLogin_Load(object sender, EventArgs e)
        {
            #region Actualización
            //string rutaserver = Common.Utils.GetApplicationConfigValue("RutaServer_Act").ToString();
            //string rutapc = Common.Utils.GetApplicationConfigValue("RutaPC_Act").ToString();
            //string rutaejecutable = Common.Utils.GetApplicationConfigValue("RutaAct_exe").ToString();
            //if (File.Exists(rutaserver) && File.Exists(rutapc) && File.Exists(rutaejecutable))
            //{
            //    DateTime fechatxt = File.GetLastWriteTime(rutaserver);
            //    DateTime fechatxt2 = File.GetLastWriteTime(rutapc);
            //    if (fechatxt != fechatxt2)
            //    {
            //        System.Diagnostics.Process.Start(rutaejecutable);
            //        this.Close();
            //    }
            //    else
            //    {
            //        //MessageBox.Show("NO HAY ACTUALICACIONES PENDIENTES...", "ACTUALIZACIÓN", MessageBoxButtons.OK, MessageBoxIcon.Information);
            //    }
            //}
            #endregion

            OperationResult objOperationResult = new OperationResult();

            ////----------------------------------------------------------------------------------------------------------------
            //bool Validador = false;
            //string[] Serial = new string[]
            //{
            //    "E63B2796",
            //    "2443F7CC"
            //};

            // string MAC1 =   SerieDD();
            //foreach (var item in Serial)
            //{
            //    if (item == MAC1)
            //    {
            //        Validador = true;
            //    }
            //}

            //if (Validador != true)
            //{
            //    MessageBox.Show(objOperationResult.ExceptionMessage, "Error al conectarse a Base de Datos !!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            //    this.Close();
            //}

            ////----------------------------------------------------------------------------------------------------------------


            // Obtener el ID del nodo del archivo de configuración
            _intNodeId = int.Parse(Common.Utils.GetApplicationConfigValue("NodeId"));


            string MAC = Common.Utils.GetApplicationConfigValue("ClientSettingsProviderx");

            // Leer el nodo
            NodeBL objNodeBL = new NodeBL();

            nodeDto objNodeDto = objNodeBL.GetNodeByNodeId(ref objOperationResult, _intNodeId);
            if (objOperationResult.Success == 1)
            {
                // Mostrar el nombre del nodo
                txtNode.Text = objNodeDto.v_Description;
            }
            else
            {
                MessageBox.Show(objOperationResult.ExceptionMessage, "Error al conectarse a Base de Datos !!", MessageBoxButtons.OK, MessageBoxIcon.Error);

                btnOK.Enabled       = false;
                txtUserName.Enabled = false;
                txtPassword.Enabled = false;

                this.Close();
            }
        }