Exemple #1
0
        private void BindData()
        {
            PatientDataTier aDatatier = new PatientDataTier();

            string date = Convert.ToString(Session["date"]);



            if ((date.Length > 0))
            {
                DataSet aDataset = new DataSet();
                aDataset = aDatatier.SHOWBYDATE(date);
                if (aDataset.Tables[0].Rows.Count > 0)
                {
                    grdViewRefills.Visible    = true;
                    grdViewRefills.DataSource = aDataset.Tables[0];


                    if (Cache["StudentData"] == null)
                    {
                        Cache.Add("StudentData", new DataView(aDataset.Tables[0]), null, System.Web.Caching.Cache.NoAbsoluteExpiration,
                                  System.TimeSpan.FromMinutes(10), System.Web.Caching.CacheItemPriority.Default, null);
                        grdViewRefills.DataBind();
                    }
                }
                else
                {
                    grdViewRefills.Visible = false;
                }
            }
            else
            {
                grdViewRefills.Visible = false;
            }
        }
Exemple #2
0
        public void GetRefill(string date_refill, string type)
        {
            PatientDataTier phyDT = new PatientDataTier();
            DataSet         ds    = new DataSet();
            string          gender;

            //Home record = new Home();
            //DataSet recordTBE = new DataSet();
            //string recordToBeEdited = recordToBeEdited;

            //record.decryptQueryString(recordToBeEdited.ToString());

            ds = phyDT.SHOWBYDATE(date_refill);

            if (ds.Tables[0].Rows.Count > 0)
            {
                txtRXNumber.Text   = ds.Tables[0].Rows[0]["rx_number"].ToString();
                txtDateRefill.Text = ds.Tables[0].Rows[0]["date_refill"].ToString();
                textAmount.Text    = ds.Tables[0].Rows[0]["amount"].ToString();



                if (type.ToUpper() == "EDIT")
                {
                    txtRXNumber.Enabled   = false;
                    txtDateRefill.Enabled = true;
                    textAmount.Enabled    = true;


                    btnSave.Visible    = true;
                    btnClose.Visible   = true;
                    btnSave.Text       = "UPDATE";
                    btnClose.Text      = "REFRESH";
                    btnSave.ForeColor  = Color.Red;
                    btnClose.ForeColor = Color.Blue;
                }
            }
        }