public OTRegistration GetMultipleNurse()
        {
            SisterMaster obj = new SisterMaster();

            obj.CMD = "View";
            obj.hid = Convert.ToInt32(HttpContext.Current.Session["hospital"].ToString());
            string       xml = Common.ToXML(obj);
            DBConnection con = new DBConnection();
            DataSet      ds  = con.ExecuteProcedure("SP_SisterRegistration", xml);

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                nurse.Add(new SelectListItem {
                    Text = ds.Tables[0].Rows[i]["fname"].ToString() + " " + ds.Tables[0].Rows[i]["lname"].ToString(), Value = ds.Tables[0].Rows[i]["sisterid"].ToString()
                });
            }
            return(this);
        }
Esempio n. 2
0
        public List <SisterMaster> GetAllSister()
        {
            this.CMD = "View";
            this.hid = Convert.ToInt32(HttpContext.Current.Session["hospital"].ToString());
            string       xml = Common.ToXML(this);
            DBConnection con = new DBConnection();
            DataSet      ds  = con.ExecuteProcedure("SP_SisterRegistration", xml);

            List <SisterMaster> Sisterlist = new List <SisterMaster>();

            if (ds != null)
            {
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    SisterMaster om = new SisterMaster();
                    om.sisterid = Convert.ToInt32(ds.Tables[0].Rows[i]["sisterid"].ToString());
                    om.fname    = ds.Tables[0].Rows[i]["fname"].ToString();
                    om.lname    = ds.Tables[0].Rows[i]["lname"].ToString();
                    Sisterlist.Add(om);
                }
            }
            return(Sisterlist);
        }