コード例 #1
0
        public OTRegistration GetMultipleDoctor()
        {
            DoctorMaster obj = new DoctorMaster();

            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_DoctorRegistration", xml);

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                doctor.Add(new SelectListItem {
                    Text = ds.Tables[0].Rows[i]["fname"].ToString() + " " + ds.Tables[0].Rows[i]["lname"].ToString(), Value = ds.Tables[0].Rows[i]["fname"].ToString() + " " + ds.Tables[0].Rows[i]["lname"].ToString()
                });
            }
            return(this);
        }
コード例 #2
0
        public List <DoctorMaster> GetAllDoctor()
        {
            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_DoctorRegistration", xml);

            List <DoctorMaster> Doctorlist = new List <DoctorMaster>();

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