Ejemplo n.º 1
0
        private void LoadData()
        {
            DataTable data = new BAL.Manager.ServiceManager().GetPathology();

            dataGridView1.AutoGenerateColumns = false;
            dataGridView1.DataSource          = data;
        }
Ejemplo n.º 2
0
        public void PatholgyID()
        {
            DataTable dt = new BAL.Manager.ServiceManager().GeneratePatholgyId();

            if (dt != null && dt.Rows.Count > 0)
            {
                txtID.Text = "Path-00" + dt.Rows[0][0].ToString();
            }
        }
Ejemplo n.º 3
0
        private void UpdatePathology()
        {
            try
            {
                DAL.Model.PathologyMaster Pathology = new DAL.Model.PathologyMaster();
                Pathology.PathId        = txtID.Text;;
                Pathology.PathologyName = Convert.ToString(txtName.Text);
                Pathology.Address       = Convert.ToString(txtAddress.Text);
                Pathology.Alias         = Convert.ToString(txtAlias.Text);
                Pathology.UserId        = MainWindow.userName;

                MessageModel messageModel = new BAL.Manager.ServiceManager().UpdatePathology(Pathology);
                MessageBox.Show(messageModel.MessageBody, messageModel.MessageTitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
                SetNew();
            }
            catch (Exception error)
            {
                MessageBox.Show("Failed to save Pathology! " + error.Message.ToString(), "Failed", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }