Beispiel #1
0
        public ActionResult waitingtime(string Fromdate, string Todate)
        {
            SqlConnection con = null;
            SqlCommand    cmd = null;
            SqlDataReader dr;
            List <DoctorDashboardClass> obj = new List <DoctorDashboardClass>();
            DoctorDashboardClass        s;

            using (con = new SqlConnection("Data Source=WEB-SERVER\\SQLEXPRESS;Initial Catalog=Putralive;Integrated Security=True"))
            {
                con.Open();
                con.CreateCommand();
                using (cmd = new SqlCommand("patient_waiting_time_bi", con))
                {
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.Add(new SqlParameter("@FromDate", Fromdate));
                    cmd.Parameters.Add(new SqlParameter("@Todate", Todate));

                    dr = cmd.ExecuteReader();
                    while (dr.Read())
                    {
                        s      = new DoctorDashboardClass();
                        s.Name = DBNull.Value.Equals(dr["Patient"]) ? "" : Convert.ToString(dr["Patient"]);
                        s.Id   = DBNull.Value.Equals(dr["Minutes"]) ? 0 : Convert.ToInt64(dr["Minutes"]);

                        obj.Add(s);
                    }
                }
                return(Json(obj, JsonRequestBehavior.AllowGet));
            }
        }
Beispiel #2
0
        public ActionResult department(Int64 Appointmentstatus, string Department)
        {
            SqlConnection con = null;
            SqlCommand    cmd = null;
            SqlDataReader dr;
            List <DoctorDashboardClass> obj = new List <DoctorDashboardClass>();
            DoctorDashboardClass        s;

            using (con = new SqlConnection("Data Source=WEB-SERVER\\SQLEXPRESS;Initial Catalog=Putralive;Integrated Security=True"))
            {
                con.Open();
                con.CreateCommand();
                using (cmd = new SqlCommand("appoiment_dep_gen", con))
                {
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.Add(new SqlParameter("@Department", Department));
                    cmd.Parameters.Add(new SqlParameter("@Appointmentstatus", Appointmentstatus));

                    dr = cmd.ExecuteReader();
                    while (dr.Read())
                    {
                        s      = new DoctorDashboardClass();
                        s.Name = DBNull.Value.Equals(dr["NAME"]) ? "" : Convert.ToString(dr["NAME"]);
                        s.Id   = DBNull.Value.Equals(dr["CountVal"]) ? 0 : Convert.ToInt64(dr["CountVal"]);

                        obj.Add(s);
                    }
                }
                return(Json(obj, JsonRequestBehavior.AllowGet));
            }
        }
Beispiel #3
0
        public List <DoctorDashboardClass> dropdownlist1()
        {
            SqlConnection con = null;
            SqlCommand    cmd = null;
            SqlDataReader dr  = null;
            List <DoctorDashboardClass> obj = new List <DoctorDashboardClass>();
            DoctorDashboardClass        s;

            using (con = new SqlConnection("Data Source=WEB-SERVER\\SQLEXPRESS;Initial Catalog=Putralive;Integrated Security=True"))
            {
                con.Open();
                con.CreateCommand();
                using (cmd = new SqlCommand("Sp_dropdownweek", con))
                {
                    cmd.CommandType = CommandType.StoredProcedure;
                    dr = cmd.ExecuteReader();
                    while (dr.Read())
                    {
                        s      = new DoctorDashboardClass();
                        s.Name = DBNull.Value.Equals(dr["Weeks"]) ? "" : Convert.ToString(dr["Weeks"]);
                        obj.Add(s);
                    }
                }
            }
            return(obj);
        }
Beispiel #4
0
        public List <DoctorDashboardClass> PatientTypes(string Fromdate, string Todate)
        {
            IDbConnection con = null;
            IDbCommand    cmd = null;
            IDataReader   dr;
            List <DoctorDashboardClass> obj = new List <DoctorDashboardClass>();
            DoctorDashboardClass        s;

            using (con = DataFactory.CreateConnection1())
            {
                con.Open();
                con.CreateCommand();
                using (cmd = DataFactory.CreateCommand("check_count_ss", con))
                {
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.Add(new SqlParameter("@FromDate", Fromdate));
                    cmd.Parameters.Add(new SqlParameter("@ToDate", Todate));
                    dr = cmd.ExecuteReader();
                    while (dr.Read())
                    {
                        s          = new DoctorDashboardClass();
                        s.Name     = DBNull.Value.Equals(dr["NAME"]) ? "" : Convert.ToString(dr["NAME"]);
                        s.countval = DBNull.Value.Equals(dr["CountVal"]) ? 0 : Convert.ToInt64(dr["CountVal"]);

                        obj.Add(s);
                    }
                }
                return(obj);
            }
        }
Beispiel #5
0
        public List <DoctorDashboardClass> Sharesinlab(string Fromdate)
        {
            SqlConnection con = null;
            SqlCommand    cmd = null;
            SqlDataReader dr;
            List <DoctorDashboardClass> obj = new List <DoctorDashboardClass>();
            DoctorDashboardClass        s;

            using (con = new SqlConnection("Data Source=WEB-SERVER\\SQLEXPRESS;Initial Catalog=Putralive;Integrated Security=True"))
            {
                con.Open();
                con.CreateCommand();
                using (cmd = new SqlCommand("sp_lab_share", con))
                {
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.Add(new SqlParameter("@FromDate", Fromdate));

                    dr = cmd.ExecuteReader();
                    while (dr.Read())
                    {
                        s          = new DoctorDashboardClass();
                        s.Name     = DBNull.Value.Equals(dr["NAME"]) ? "" : Convert.ToString(dr["NAME"]);
                        s.countval = DBNull.Value.Equals(dr["countHospital"]) ? 0 : Convert.ToInt64(dr["countHospital"]);
                        s.AdvAmt   = DBNull.Value.Equals(dr["countDoctorshare"]) ? 0 : Convert.ToInt64(dr["countDoctorshare"]);
                        obj.Add(s);
                    }
                }
                return(obj);
            }
        }
Beispiel #6
0
        public List <DoctorDashboardClass> Sharesinscan(string Fromdate)
        {
            IDbConnection con = null;
            IDbCommand    cmd = null;
            IDataReader   dr;
            List <DoctorDashboardClass> obj = new List <DoctorDashboardClass>();
            DoctorDashboardClass        s;

            using (con = DataFactory.CreateConnection1())
            {
                con.Open();
                con.CreateCommand();
                using (cmd = DataFactory.CreateCommand("sp_scan_share", con))
                {
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.Add(new SqlParameter("FromDate", Fromdate));

                    dr = cmd.ExecuteReader();
                    while (dr.Read())
                    {
                        s          = new DoctorDashboardClass();
                        s.Name     = DBNull.Value.Equals(dr["NAME"]) ? "" : Convert.ToString(dr["NAME"]);
                        s.countval = DBNull.Value.Equals(dr["countHospital"]) ? 0 : Convert.ToInt64(dr["countHospital"]);
                        s.AdvAmt   = DBNull.Value.Equals(dr["countDoctorshare"]) ? 0 : Convert.ToInt64(dr["countDoctorshare"]);
                        obj.Add(s);
                    }
                }
                return(obj);
            }
        }
Beispiel #7
0
        public List <DoctorDashboardClass> Doctorsharepharmacy(string Fromdate)
        {
            IDbConnection con = null;
            IDbCommand    cmd = null;
            IDataReader   dr;
            List <DoctorDashboardClass> obj = new List <DoctorDashboardClass>();
            DoctorDashboardClass        s;

            // decimal lm = 0;

            using (con = DataFactory.CreateConnection1())
            {
                con.Open();
                con.CreateCommand();
                using (cmd = DataFactory.CreateCommand("sp_doctor_share", con))
                {
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.Add(new SqlParameter("@FromDate", Fromdate));
                    //cmd.Parameters.Add(new SqlParameter("@ToDate", Todate));
                    dr = cmd.ExecuteReader();
                    while (dr.Read())
                    {
                        s = new DoctorDashboardClass();

                        s.Name     = DBNull.Value.Equals(dr["NAME"]) ? "" : Convert.ToString(dr["NAME"]);
                        s.countval = DBNull.Value.Equals(dr["countHospital"]) ? 0 : Convert.ToInt64(dr["countHospital"]);
                        s.AdvAmt   = DBNull.Value.Equals(dr["countDoctorshare"]) ? 0 : Convert.ToInt64(dr["countDoctorshare"]);

                        // s.Clientaddress = DBNull.Value.Equals(dr["CountVal"]) ? "" : Convert.ToString(dr["CountVal"]);
                        // s.percentage = decimal.Parse(s.Clientaddress);
                        //s.percentage = Int64.Parse(s.Clientaddress.ToString());
                        obj.Add(s);
                    }
                }
                return(obj);
            }
        }