예제 #1
0
        string getAllDoctor(string ispromo)
        {
            string             DoctorsData = "";
            HcDoctorinfoEntity obj         = new HcDoctorinfoEntity();

            obj.Isactive = "Active";
            obj.Sortby   = "yes";
            obj.Isview   = "checked";
            obj.ispromo  = ispromo;
            DataTable dt = (DataTable)ExecuteDB(HCareTaks.AG_GetAllHcDoctorinfoRecord, obj);

            foreach (DataRow dr in dt.Rows)
            {
                DoctorsData += @"<div class='card border-bottom-theme-color-2px maxwidth400' >" +
                               "<a href = '/Home/TheDoctor/" + dr["ID"] + "'>" +
                               "<img class='img-fullwidth boxImg img-fluid' alt='' src='" + dr["Photo"] + "'>" +
                               "<div class='team-overlay'></div>" +
                               "<div class='card-body'>" +
                               "<h4 class='card-title'>" + dr["Name"] + "</h4>" +
                               "<h6 class='card-text'>" + dr["DepartmentName"] + "</h6>" +
                               "<h6 class='text-theme-colored  font-weight-400 mt-0'>" + dr["Specialist"] + "</h6>" +
                               "<h6 class='text-theme-colored  font-weight-400 mt-0'>" + dr["education"] + "</h6>" +
                               "<h6 class='text-theme-colored  font-weight-400 mt-0'>" + "Total year of experince:  <span class='label label-info'>" + dr["Experience"] + " </span> &nbsp; Years </h6>" +


                               "</div> </a></div>";
            }

            return(DoctorsData);
        }
예제 #2
0
        public object SaveHcDoctorinfoInfo(HcDoctorinfoEntity hcDoctorinfoEntity, Database db, DbTransaction transaction)
        {
            string    sql       = "select Isnull(MAX(SortBy),0)+1 from HC_DoctorInfo";
            DbCommand dbCommand = db.GetSqlStringCommand(sql);

            if (string.IsNullOrEmpty(hcDoctorinfoEntity.Sortby))
            {
                hcDoctorinfoEntity.Sortby = db.ExecuteScalar(dbCommand, transaction).ToString();
            }

            sql       = "INSERT INTO HC_DoctorInfo ( Name, Department, Specialist, Education, Experience, About, Fees, JoinDate, Photo, Gender, IsActive, CreatedBy, CreatedTime, SortBy, IsView, ViewBy, ViewTime ) output inserted.ID VALUES (  @Name,  @Department,  @Specialist,  @Education,  @Experience,  @About,  @Fees,  @Joindate,  @Photo,  @Gender,  @Isactive,  @Createdby,  @Createdtime,  @Sortby,  @Isview,  @Viewby,  @Viewtime )";
            dbCommand = db.GetSqlStringCommand(sql);

            db.AddInParameter(dbCommand, "Name", DbType.String, hcDoctorinfoEntity.Name);
            db.AddInParameter(dbCommand, "Department", DbType.String, hcDoctorinfoEntity.Department);
            db.AddInParameter(dbCommand, "Specialist", DbType.String, hcDoctorinfoEntity.Specialist);
            db.AddInParameter(dbCommand, "Education", DbType.String, hcDoctorinfoEntity.Education);
            db.AddInParameter(dbCommand, "Experience", DbType.String, hcDoctorinfoEntity.Experience);
            db.AddInParameter(dbCommand, "About", DbType.String, hcDoctorinfoEntity.About);
            db.AddInParameter(dbCommand, "Fees", DbType.String, hcDoctorinfoEntity.Fees);
            db.AddInParameter(dbCommand, "Joindate", DbType.String, hcDoctorinfoEntity.Joindate);
            db.AddInParameter(dbCommand, "Photo", DbType.String, hcDoctorinfoEntity.Photo);
            db.AddInParameter(dbCommand, "Gender", DbType.String, hcDoctorinfoEntity.Gender);
            db.AddInParameter(dbCommand, "Isactive", DbType.String, hcDoctorinfoEntity.Isactive);
            db.AddInParameter(dbCommand, "Createdby", DbType.String, hcDoctorinfoEntity.Createdby);
            db.AddInParameter(dbCommand, "Createdtime", DbType.String, hcDoctorinfoEntity.Createdtime);
            db.AddInParameter(dbCommand, "SortBy", DbType.String, hcDoctorinfoEntity.Sortby);
            db.AddInParameter(dbCommand, "Isview", DbType.String, hcDoctorinfoEntity.Isview);
            db.AddInParameter(dbCommand, "Viewby", DbType.String, hcDoctorinfoEntity.Viewby);
            db.AddInParameter(dbCommand, "Viewtime", DbType.String, hcDoctorinfoEntity.Viewtime);

            var id = db.ExecuteScalar(dbCommand, transaction).ToString();

            return(id);
        }
예제 #3
0
        public object UpdateHcDoctorinfoInfo(object param)
        {
            Database db     = DatabaseFactory.CreateDatabase();
            object   retObj = null;

            using (DbConnection connection = db.CreateConnection())
            {
                connection.Open();
                DbTransaction transaction = connection.BeginTransaction();
                try
                {
                    HcDoctorinfoEntity hcDoctorinfoEntity = (HcDoctorinfoEntity)param;
                    HcDoctorinfoDAL    hcDoctorinfoDAL    = new HcDoctorinfoDAL();
                    retObj = (object)hcDoctorinfoDAL.UpdateHcDoctorinfoInfo(hcDoctorinfoEntity, db, transaction);
                    transaction.Commit();
                }
                catch
                {
                    transaction.Rollback();
                    throw;
                }
                finally
                {
                    connection.Close();
                }
            }
            return(retObj);
        }
예제 #4
0
        public JsonResult AppointDoctorInfo(string Doc)
        {
            string Result = "";

            if (!string.IsNullOrEmpty(Doc))
            {
                string Img = "/Docx/NoImage.jpg", Days = "none", Fees = "0", Rating = "0";

                HcDoctorinfoEntity obj = (HcDoctorinfoEntity)ExecuteDB(HCareTaks.AG_GetSingleHcDoctorinfoRecordById, Doc);
                if (obj != null)
                {
                    if (!string.IsNullOrEmpty(obj.Photo))
                    {
                        Img = obj.Photo;
                    }
                    if (!string.IsNullOrEmpty(obj.Fees))
                    {
                        Fees = obj.Fees;
                    }
                    Days   = DoctorDaysOfWeek(Doc);
                    Rating = DoctorRating(Doc);
                }

                Result = "<label class='text-info'>Doctor Information</label>" +
                         "<img alt='' src='" + Img + "' style='margin-top:7px;overflow:hidden;width:150px; height:auto;' onclick = 'window.open(this.src)' />" +
                         "<label class='text-info mt-20'>Days In Week</label><p>" + Days + "</p>" +
                         "<label class='text-info'>Fees</label><p>Tk. " + Fees + "</p>" +
                         "<label class='text-info'>Rating</label><p>" + Rating + " Star</p>" +
                         "<p><a class='btn btn-block btn-warning pt-0 pb-0' href='/WebAccount/DoctorProfile/" + Doc + "' target='_blank'>Details...</a></p>";
            }
            return(Json(Result, JsonRequestBehavior.AllowGet));
        }
예제 #5
0
        public ActionResult DoctorCreate(string Id)
        {
            string eMsg = SiteMainMenuList("Doctor Details", "Settings", "DoctorList");

            if (!string.IsNullOrEmpty(eMsg))
            {
                return(RedirectToOut(eMsg));
            }
            //else if (!SiteUserAccess("", "V")) return RedirectToOut();

            ViewBag.DepartmentList = List_Department();
            ViewBag.GenderList     = List_Gender();
            ViewBag.FilePath       = "/Docx/NoImage.jpg";

            HcDoctorinfoEntity obj = new HcDoctorinfoEntity();

            obj.Gender = "Male";
            if (!string.IsNullOrEmpty(Id))
            {
                obj = (HcDoctorinfoEntity)ExecuteDB(HCareTaks.AG_GetSingleHcDoctorinfoRecordById, Id);
                if (obj == null)
                {
                    obj = new HcDoctorinfoEntity();
                }
                else if (!string.IsNullOrEmpty(obj.Photo))
                {
                    ViewBag.FilePath = obj.Photo;
                }
            }

            return(View(obj));
        }
예제 #6
0
        public ActionResult Consultants(HcDoctorinfoEntity obj)
        {
            obj.Name       = String.Format("{0}", Request.Form["searchtrm"]);
            obj.Department = String.Format("{0}", Request.Form["Specialist"]);
            obj.countryid  = String.Format("{0}", Request.Form["Countryname"]);

            obj.Gender = String.Format("{0}", Request.Form["genderM"]);// ? String.Format("{0}", Request.Form["genderF"]) :"";

            if (obj.Gender != "Male")
            {
                obj.Gender = String.Format("{0}", Request.Form["genderF"]);//
            }
            else
            {
                obj.Gender = "";
            }
            obj.Experience = String.Format("{0}", Request.Form["expfeild"]);
            if (!string.IsNullOrEmpty(obj.Name))
            {
                obj.Searchflag = "Yes";
            }

            ViewBag.getCountryData    = List_Country();
            ViewBag.getSpecialistData = List_Specialist();
            ViewBag.getLocation       = List_Location();
            ViewBag.DoctorData        = DoctorsData(obj);

            return(View());
        }
예제 #7
0
        string DoctorsData(HcDoctorinfoEntity mobj)
        {
            string             TableData = "";
            HcDoctorinfoEntity obj       = new HcDoctorinfoEntity();

            obj.Isactive = "Active";
            obj.Sortby   = "yes";
            obj.Isview   = "checked";
            //new params
            if (mobj.Searchflag != "Yes")
            {
                obj.Department = mobj.Department;
                obj.countryid  = mobj.countryid;
                obj.Location   = mobj.locationid;
                obj.Experience = mobj.Experience;
                obj.Gender     = mobj.Gender;
            }
            else
            {
                obj.Name       = mobj.Name;
                obj.Searchflag = mobj.Searchflag;
            }


            DataTable dt = (DataTable)ExecuteDB(HCareTaks.AG_GetAllHcDoctorinfoRecord, obj);

            if (dt.Rows.Count > 1)
            {
                foreach (DataRow dr in dt.Rows)
                {
                    TableData += @"<div class=' col-md-3 col-lg-3 col-xl-4 doctor-card'>" +
                                 "<a class='' href = '/Home/TheDoctor/" + dr["ID"] + "' >" +
                                 "<div class='team-thumb'>" +
                                 "<img class='img-fullwidth boxImg img-fluid' alt='' src='" + dr["Photo"] + "'>" +
                                 "<div class='team-overlay'></div>" +
                                 "</div>" +
                                 "<div class='card-body'>" +
                                 "<h4 class='text-uppercase font-weight-600 m-5'>" + dr["Name"] + "</h4>" +
                                 "<h6 class='text-theme-colored font-weight-400 mt-0'>" + dr["DepartmentName"] + "</h6> </hr>" +
                                 "<h6 class='text-theme-colored  font-weight-400 mt-0'>" + dr["Specialist"] + "</h6>" +
                                 "<h6 class='text-theme-colored  font-weight-400 mt-0'>" + dr["education"] + "</h6>" +
                                 "<h6 class='text-theme-colored  font-weight-400 mt-0'>" + "Total year of experince: <span class='label label-info'> " + dr["Experience"] + " </span> Years </h6>" +

                                 "</div>" +
                                 "</a>" +
                                 "</div>";
                }
            }
            else
            {
                TableData += @"<div class='col-md-12 col-lg-12>" +
                             "<div class='alert alert-warning' role='alert'>" +
                             "No match found, Please search again." +
                             "</div>" +
                             "</div>";
            }
            return(TableData);
        }
예제 #8
0
        public ActionResult Consultants()
        {
            // ViewBag.getCountryData = getCountry();
            HcDoctorinfoEntity obj = new HcDoctorinfoEntity();

            ViewBag.getCountryData    = List_Country();
            ViewBag.getSpecialistData = List_Specialist();
            ViewBag.getLocation       = List_Location();
            ViewBag.DoctorData        = DoctorsData(obj);
            return(View());
        }
예제 #9
0
        string getDoctors(string id)
        {
            string             singleDoctorData = "";
            HcDoctorinfoEntity obj = new HcDoctorinfoEntity();

            obj.Isactive   = "Active";
            obj.Department = id;
            DataTable dt = (DataTable)ExecuteDB(HCareTaks.AG_GetAllHcDoctorinfoRecord, obj);

            singleDoctorData += @"<div class='card flex-row flex-wrap'>" + "<h5>" + dt.Rows.Count + "<small> Counsultant found near you. </small>" + "</h5>" + "</div>";
            if (dt.Rows.Count > 0)
            {
                foreach (DataRow dr in dt.Rows)
                {
                    singleDoctorData += @"<div class='card custome-card '>" +
                                        "<a href='/Home/TheDoctor/" + dr["ID"] + "' >" +
                                        "<div class='card-header border-0'>" +
                                        "<div class='row'>" +
                                        " <div class ='col-md-6 col-lg-6'><img  class='img img-fluid card-img pull-left' src='" + dr["Photo"] + "' alt=''> </div>" +
                                        "<div class ='col-md-6 col-lg-6'><a class='btn btn-success btn-block pull-right' href = '/WebAccount/NewAppointment/" + dr["ID"] + "'>" + "Consult Now" + "</a> " +
                                        "</div>" +
                                        "</div>" +
                                        "</div>" +
                                        "<div class='card-body'> <div class='row'>" +
                                        "<div class='col-md-8 col-lg-8 pull-left'>" +
                                        "<h4 class='card-title text-colored'>" + dr["Name"] + "</h4>" +
                                        "<p class='card-text'>" + dr["Specialist"] + "</p>" +
                                        "<p class='card-text'>" + dr["education"] + "</p>" +
                                        "<p class='font-weight-400 mt-0'>" + "Total year of experince: <span class='badge badge-pill badge-primary'>" + dr["Experience"] + " Years </span></p> " +
                                        "</div>" +
                                        "<div class='col-md-4 col-lg-4 pull-right'>" +
                                        "<img  src='" + dr["CFlag"] + "' class='img img-fluid' alt='country flag'>" +
                                        "<p class='card-text'> <small>" + dr["Countryname"] + "</small></p>" +
                                        "<p class='card-text'> Fees: <strong> " + dr["fees"] + "</strong></p>" +
                                        "<p class='card-text'>  Rating: <strong>" + dr["DoctroRating"] + "/5</strong></p>" +
                                        "</div>" +
                                        "</div>" +
                                        "</div>" +

                                        "<div class='card-footer w-100 text-muted'>" +
                                        "<p class='card-text'> <strong> Speak: " + dr["language"] + "</strong></p>" +
                                        "</div> " +
                                        "</a>" +
                                        "</div>";
                }
            }
            else
            {
                singleDoctorData += @"<div class='card flex-row flex-wrap'>" + "<h4> No consultant found! </h4>" + "</div>";
            }

            return(singleDoctorData);
        }
예제 #10
0
        string getSingleDoctorsData(string id)
        {
            string             TableData = "";
            HcDoctorinfoEntity obj       = new HcDoctorinfoEntity();

            obj.Isactive = "Active";
            obj.Sortby   = "yes";
            obj.Isview   = "checked";
            obj.Id       = id;

            DataTable dt = (DataTable)ExecuteDB(HCareTaks.AG_GetAllHcDoctorinfoRecord, obj);

            foreach (DataRow dr in dt.Rows)
            {
                TableData += @"<div class='row'>" +
                             "<div class='col-md-3 col-lg-3'>" +
                             "<img class='img boxImg img-fluid' alt='' src='" + dr["Photo"] + "'>" +
                             "</div>" +
                             "<div class='col-md-3 col-lg-6'>" +
                             "<h3 class='card-title'>" + dr["Name"] + "&nbsp; &nbsp; <Span>" + "<img class='img img-fluid' src='" + dr["CFlag"] + "' alt='" + dr["Countryname"] + "'/>" + "</Span></h3>" +
                             "<h5 class='card-text'>" + dr["DepartmentName"] + "</h5>" +
                             "<h6 class='text-theme-colored  font-weight-400 mt-0'>" + dr["Specialist"] + "</h6>" +
                             "<h6 class='text-theme-colored  font-weight-400 mt-0'>" + dr["education"] + "</h6>" +
                             "<p class='text-theme-colored  font-weight-400 mt-0'>" + "Total year of experince:  <span class='label label-info'> " + dr["Experience"] + " </span> &nbsp; Years </h6> <hr/>" +

                             "<h5 class='font-weight-400 mt-0'> Can speak: " + dr["language"] + "</h5>" +

                             "</div>" +

                             /*  "<div class='col-md-3 col-lg-3 d-flex'>" +
                              * "<a href = '#' class='btn btn-lg btn-danger  btn-block'>Get appoinment</a>" +
                              * "<div class='btn-group'>" +
                              *  "<a  class='btn btn-secondary' href='callto:+8801713060063' >"+" <i class='fa fa-phone'> Phone call </i>"+"</a>"+
                              *   "<a  class='btn btn-secondary' href='mailto:[email protected]' >" + " <i class='fa fa-envelope-o'> Send email </i>" + "</a>" +
                              * "</div>" +
                              *
                              * "</div>" +*/

                             "</div> <br/>";
                TableData = TableData + @"<div class='row'>" +
                            "<h4> About " + dr["Name"] + "</h4>" +
                            "<p>" + dr["About"] + "</p>" +
                            "</div>";
                TableData = TableData + @"<div class='row'>" +
                            "<h4> Hospitals Associated with </h4>" +
                            "<p>" + dr["Organizationname"] + "</p>" +
                            "</div>";
            }
            return(TableData);
        }
예제 #11
0
        public JsonResult DoctorDeleteById(string Id)
        {
            bool Success           = false;
            HcDoctorinfoEntity obj = (HcDoctorinfoEntity)ExecuteDB(HCareTaks.AG_GetSingleHcDoctorinfoRecordById, Id);

            if (obj != null)
            {
                obj.Updatedby   = Session["UserId"].ToString();
                obj.Updatedtime = DateTime.Now.ToString("dd/MM/yyyy");
                obj.Isactive    = "Inactive";
                Success         = (bool)ExecuteDB(HCareTaks.AG_UpdateHcDoctorinfoInfo, obj);
            }
            string Message = Success ? "Delete Success" : "Sorry something went wrong!";

            return(Json(new { Success = Success, Message = Message }));
        }
예제 #12
0
        public JsonResult SelectedUserInfo(string ut = "", string uid = "")
        {
            string Img = "/Docx/NoImage.jpg", Name = "", Gender = "";

            if (ut == "Doctor" && !string.IsNullOrEmpty(uid))
            {
                HcDoctorinfoEntity obj = (HcDoctorinfoEntity)ExecuteDB(HCareTaks.AG_GetSingleHcDoctorinfoRecordById, uid);
                if (obj != null)
                {
                    Img    = obj.Photo;
                    Name   = obj.Name;
                    Gender = obj.Gender;
                }
            }
            return(Json(new { Img = Img, Name = Name, Gender = Gender }));
        }
예제 #13
0
        public string SelectTypeUser(string ut = "", string sel = "")
        {
            string TableData = "<option>Select...</option>";

            if (ut == "Doctor")
            {
                HcDoctorinfoEntity obj = new HcDoctorinfoEntity();
                DataTable          dt  = (DataTable)ExecuteDB(HCareTaks.AG_GetAllHcDoctorinfoRecord, obj);
                foreach (DataRow dr in dt.Rows)
                {
                    string selcted = !string.IsNullOrEmpty(sel) && sel.ToLower() == dr["ID"].ToString().ToLower() ? "selcted" : "";
                    string aClass  = dr["IsActive"].ToString() == "Active" ? "text-success" : "text-danger";
                    TableData += "<option class='" + aClass + "' value='" + dr["ID"] + "' " + selcted + ">" + dr["Name"] + " (" + dr["DepartmentName"] + ")</option>";
                }
            }
            return(TableData);
        }
예제 #14
0
        string DoctorListTableData()
        {
            string             TableData = "";
            HcDoctorinfoEntity obj       = new HcDoctorinfoEntity();

            obj.Sortby = "yes";
            DataTable dt    = (DataTable)ExecuteDB(HCareTaks.AG_GetAllHcDoctorinfoRecord, obj);
            int       Count = 1;

            foreach (DataRow dr in dt.Rows)
            {
                string Action = "<i class='mdi mdi-table-edit iAction' title='Edit This' onclick=\"EditDetails('" + dr["ID"].ToString() + "')\" style='color:orange'></i>";
                Action    += "<i class='mdi mdi-close-box iAction' title='Inactive This' onclick=\"DeleteDetails('" + dr["ID"].ToString() + "', this)\" style='color:red'></i>";
                TableData +=
                    "<tr>" +
                    "<td><i class='mdi mdi-format-float-left iAction' title='Schedules' onclick=\"ScheduleDetails('" + dr["Id"].ToString() + "')\" style='color:green'></i></td>" +
                    "<td>" + dr["SortBy"] + "</td>" +
                    "<td>" + dr["Name"] + "</td>" +
                    "<td>" + dr["DepartmentName"] + "</td>" +
                    "<td>" + dr["Specialist"] + "</td>" +
                    "<td>" + dr["Gender"] + "</td>" +
                    "<td>" + dr["Fees"] + "</td>" +
                    "<td class='IsActive'>" + dr["IsActive"] + "</td>" +
                    "<td>" + Action + "</td>" +
                    "</tr>";
                Count += 1;
            }

            string CreateBtn = "<button class='btn btn-primary' type='button' onclick='CreateDetails()'  style='margin-bottom:10px;'> New</button>";
            string tHead     =
                "<tr>" +
                "<th>SortBy</th>" +
                "<th>Name</th>" +
                "<th>Department</th>" +
                "<th width='20%'>Specialist</th>" +
                "<th>Gender</th>" +
                "<th>Fees</th>" +
                "<th>IsActive</th>" +
                "<th>Action</th>" +
                "</tr>";

            TableData = CreateBtn + "<div class='table-responsive'><table id='zero_config' class='table table-striped table-bordered'>" +
                        "<thead>" + tHead + "</thead><tbody>" + TableData + "</tbody></table></div>";

            return(TableData);
        }
예제 #15
0
        public List <SelectListItem> List_Doctor(string IsActive = "Active", string DepId = "")
        {
            List <SelectListItem> Items = new List <SelectListItem>();
            HcDoctorinfoEntity    obj   = new HcDoctorinfoEntity();

            obj.Isactive   = IsActive;
            obj.Department = DepId;
            DataTable dt = (DataTable)ExecuteDB(HCareTaks.AG_GetAllHcDoctorinfoRecord, obj);

            foreach (DataRow dr in dt.Rows)
            {
                Items.Add(new SelectListItem {
                    Text = dr["Name"] + " (" + dr["DepartmentName"] + ")", Value = dr["ID"].ToString()
                });
            }
            return(Items);
        }
예제 #16
0
        public List <SelectListItem> List_Location()
        {
            List <SelectListItem> Items = new List <SelectListItem>();
            HcDoctorinfoEntity    obj   = new HcDoctorinfoEntity();

            // HcCountryEntity obj = new HcCountryEntity();
            obj.Isactive = "Active";
            DataTable dt = (DataTable)ExecuteDB(HCareTaks.AG_GetAllHcDoctorinfoRecord, obj);

            foreach (DataRow dr in dt.Rows)
            {
                Items.Add(new SelectListItem {
                    Text = dr["Location"].ToString(), Value = dr["Location"].ToString()
                });
            }
            return(Items);
        }
예제 #17
0
        string DoctorsTableData()
        {
            string             TableData = "";
            HcDoctorinfoEntity obj       = new HcDoctorinfoEntity();

            obj.Isactive = "Active";
            obj.Sortby   = "yes";
            DataTable dt = (DataTable)ExecuteDB(HCareTaks.AG_GetAllHcDoctorinfoRecord, obj);

            foreach (DataRow dr in dt.Rows)
            {
                TableData += "<tr>" +
                             "<th><label class='customcheckbox'><input type='checkbox' class='listCheckbox' value='" + dr["ID"] + "' " + dr["Isview"] + " /><span class='checkmark'></span></label></th>" +
                             "<td>" + dr["SortBy"] + "</td>" +
                             "<td>" + dr["Name"] + "</td>" +
                             "<td>" + dr["Department"] + "</td>" +
                             "<td>" + dr["Specialist"] + "</td>" +
                             "<td>" + dr["Gender"] + "</td>" +
                             "<td>" + dr["Fees"] + "</td>" +
                             "</tr>";
            }
            return(TableData);
        }
예제 #18
0
        public bool UpdateHcDoctorinfoInfo(HcDoctorinfoEntity hcDoctorinfoEntity, Database db, DbTransaction transaction)
        {
            string sql = "UPDATE HC_DoctorInfo SET Name= @Name, Department= @Department, Specialist= @Specialist, Education= @Education, Experience= @Experience, About= @About, Fees= @Fees, JoinDate= @Joindate, Photo= @Photo, Gender= @Gender, IsActive= @Isactive, UpdatedBy= @Updatedby, UpdatedTime= @Updatedtime, SortBy= @Sortby, IsView= @Isview, ViewBy= @Viewby, ViewTime= @Viewtime WHERE Id=@Id";

            if (hcDoctorinfoEntity.QueryFlag == "EmptyView")
            {
                sql = "UPDATE HC_DoctorInfo SET IsView= @Isview, ViewBy= @Viewby, ViewTime= @Viewtime";
            }
            if (hcDoctorinfoEntity.QueryFlag == "SetView")
            {
                sql = "UPDATE HC_DoctorInfo SET IsView= 'checked', ViewBy= @Viewby, ViewTime= @Viewtime WHERE Id=@Id";
            }

            DbCommand dbCommand = db.GetSqlStringCommand(sql);

            db.AddInParameter(dbCommand, "Id", DbType.String, hcDoctorinfoEntity.Id);
            db.AddInParameter(dbCommand, "Name", DbType.String, hcDoctorinfoEntity.Name);
            db.AddInParameter(dbCommand, "Department", DbType.String, hcDoctorinfoEntity.Department);
            db.AddInParameter(dbCommand, "Specialist", DbType.String, hcDoctorinfoEntity.Specialist);
            db.AddInParameter(dbCommand, "Education", DbType.String, hcDoctorinfoEntity.Education);
            db.AddInParameter(dbCommand, "Experience", DbType.String, hcDoctorinfoEntity.Experience);
            db.AddInParameter(dbCommand, "About", DbType.String, hcDoctorinfoEntity.About);
            db.AddInParameter(dbCommand, "Fees", DbType.String, hcDoctorinfoEntity.Fees);
            db.AddInParameter(dbCommand, "Joindate", DbType.String, hcDoctorinfoEntity.Joindate);
            db.AddInParameter(dbCommand, "Photo", DbType.String, hcDoctorinfoEntity.Photo);
            db.AddInParameter(dbCommand, "Gender", DbType.String, hcDoctorinfoEntity.Gender);
            db.AddInParameter(dbCommand, "Isactive", DbType.String, hcDoctorinfoEntity.Isactive);
            db.AddInParameter(dbCommand, "Updatedby", DbType.String, hcDoctorinfoEntity.Updatedby);
            db.AddInParameter(dbCommand, "Updatedtime", DbType.String, hcDoctorinfoEntity.Updatedtime);
            db.AddInParameter(dbCommand, "SortBy", DbType.String, hcDoctorinfoEntity.Sortby);
            db.AddInParameter(dbCommand, "Isview", DbType.String, hcDoctorinfoEntity.Isview);
            db.AddInParameter(dbCommand, "Viewby", DbType.String, hcDoctorinfoEntity.Viewby);
            db.AddInParameter(dbCommand, "Viewtime", DbType.String, hcDoctorinfoEntity.Viewtime);

            db.ExecuteNonQuery(dbCommand, transaction);
            return(true);
        }
예제 #19
0
        public JsonResult DoctorSaveUpdate(HcDoctorinfoEntity obj)
        {
            bool Success = false;

            if (string.IsNullOrEmpty(obj.Isactive))
            {
                obj.Isactive = "Active";
            }
            if (string.IsNullOrEmpty(obj.Experience))
            {
                obj.Experience = "0";
            }
            if (string.IsNullOrEmpty(obj.Fees))
            {
                obj.Fees = "0";
            }

            if (string.IsNullOrEmpty(obj.Id))
            {
                obj.Createdby   = Session["UserId"].ToString();
                obj.Createdtime = DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss");
                obj.Id          = (string)ExecuteDB(HCareTaks.AG_SaveHcDoctorinfoInfo, obj);
                if (!string.IsNullOrEmpty(obj.Id))
                {
                    Success = true;
                }
            }
            else
            {
                obj.Updatedby   = Session["UserId"].ToString();
                obj.Updatedtime = DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss");
                Success         = (bool)ExecuteDB(HCareTaks.AG_UpdateHcDoctorinfoInfo, obj);
            }
            string Message = Success ? "Process has been done successfully" : "Sorry something went wrong!";

            return(Json(new { Success = Success, Message = Message, Id = obj.Id }));
        }
예제 #20
0
        public JsonResult DoctorsUpdate(HcDoctorinfoEntity iGet)
        {
            bool Success           = false;
            HcDoctorinfoEntity obj = new HcDoctorinfoEntity();

            obj.QueryFlag = "EmptyView";
            obj.Viewby    = Session["UserId"].ToString();
            obj.Viewtime  = DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss");
            Success       = (bool)ExecuteDB(HCareTaks.AG_UpdateHcDoctorinfoInfo, obj);

            JavaScriptSerializer      serializer = new JavaScriptSerializer();
            List <HcDoctorinfoEntity> dGetObj    = serializer.Deserialize <List <HcDoctorinfoEntity> >(iGet.JsonDetails);

            obj.QueryFlag = "SetView";
            foreach (HcDoctorinfoEntity dr in dGetObj)
            {
                obj.Id  = dr.Id;
                Success = (bool)ExecuteDB(HCareTaks.AG_UpdateHcDoctorinfoInfo, obj);
            }

            string Message = Success ? "Process has been done successfully" : "Sorry something went wrong!";

            return(Json(new { Success = Success, Message = Message }));
        }
예제 #21
0
        public HcDoctorinfoEntity GetSingleHcDoctorinfoRecordById(object param)
        {
            Database  db        = DatabaseFactory.CreateDatabase();
            string    sql       = "SELECT ID, Name, Department, Specialist, Education, Experience, About, Fees, JoinDate, Photo, Gender, IsActive, CreatedBy, CreatedTime, UpdatedBy, UpdatedTime, SortBy, IsView, ViewBy, ViewTime FROM HC_DoctorInfo WHERE Id=@Id";
            DbCommand dbCommand = db.GetSqlStringCommand(sql);

            db.AddInParameter(dbCommand, "Id", DbType.String, param);
            HcDoctorinfoEntity hcDoctorinfoEntity = null;

            using (IDataReader dataReader = db.ExecuteReader(dbCommand))
            {
                if (dataReader.Read())
                {
                    hcDoctorinfoEntity = new HcDoctorinfoEntity();
                    if (dataReader["ID"] != DBNull.Value)
                    {
                        hcDoctorinfoEntity.Id = dataReader["ID"].ToString();
                    }
                    if (dataReader["Name"] != DBNull.Value)
                    {
                        hcDoctorinfoEntity.Name = dataReader["Name"].ToString();
                    }
                    if (dataReader["Department"] != DBNull.Value)
                    {
                        hcDoctorinfoEntity.Department = dataReader["Department"].ToString();
                    }
                    if (dataReader["Specialist"] != DBNull.Value)
                    {
                        hcDoctorinfoEntity.Specialist = dataReader["Specialist"].ToString();
                    }
                    if (dataReader["Education"] != DBNull.Value)
                    {
                        hcDoctorinfoEntity.Education = dataReader["Education"].ToString();
                    }
                    if (dataReader["Experience"] != DBNull.Value)
                    {
                        hcDoctorinfoEntity.Experience = dataReader["Experience"].ToString();
                    }
                    if (dataReader["About"] != DBNull.Value)
                    {
                        hcDoctorinfoEntity.About = dataReader["About"].ToString();
                    }
                    if (dataReader["Fees"] != DBNull.Value)
                    {
                        hcDoctorinfoEntity.Fees = dataReader["Fees"].ToString();
                    }
                    if (dataReader["JoinDate"] != DBNull.Value)
                    {
                        hcDoctorinfoEntity.Joindate = dataReader["JoinDate"].ToString();
                    }
                    if (dataReader["Photo"] != DBNull.Value)
                    {
                        hcDoctorinfoEntity.Photo = dataReader["Photo"].ToString();
                    }
                    if (dataReader["Gender"] != DBNull.Value)
                    {
                        hcDoctorinfoEntity.Gender = dataReader["Gender"].ToString();
                    }
                    if (dataReader["IsActive"] != DBNull.Value)
                    {
                        hcDoctorinfoEntity.Isactive = dataReader["IsActive"].ToString();
                    }
                    if (dataReader["CreatedBy"] != DBNull.Value)
                    {
                        hcDoctorinfoEntity.Createdby = dataReader["CreatedBy"].ToString();
                    }
                    if (dataReader["CreatedTime"] != DBNull.Value)
                    {
                        hcDoctorinfoEntity.Createdtime = dataReader["CreatedTime"].ToString();
                    }
                    if (dataReader["UpdatedBy"] != DBNull.Value)
                    {
                        hcDoctorinfoEntity.Updatedby = dataReader["UpdatedBy"].ToString();
                    }
                    if (dataReader["UpdatedTime"] != DBNull.Value)
                    {
                        hcDoctorinfoEntity.Updatedtime = dataReader["UpdatedTime"].ToString();
                    }
                    if (dataReader["SortBy"] != DBNull.Value)
                    {
                        hcDoctorinfoEntity.Sortby = dataReader["SortBy"].ToString();
                    }
                    if (dataReader["IsView"] != DBNull.Value)
                    {
                        hcDoctorinfoEntity.Isview = dataReader["IsView"].ToString();
                    }
                    if (dataReader["ViewBy"] != DBNull.Value)
                    {
                        hcDoctorinfoEntity.Viewby = dataReader["ViewBy"].ToString();
                    }
                    if (dataReader["ViewTime"] != DBNull.Value)
                    {
                        hcDoctorinfoEntity.Viewtime = dataReader["ViewTime"].ToString();
                    }
                }
            }
            return(hcDoctorinfoEntity);
        }
예제 #22
0
        public DataTable GetAllHcDoctorinfoRecord(object param)
        {
            Database db  = DatabaseFactory.CreateDatabase();
            string   sql = @"SELECT distinct D.ID, D.Name, D.Department, D.Specialist, D.Education, D.Experience, D.About, D.Fees, D.JoinDate, D.Photo, D.Gender, D.IsActive, D.CreatedBy, D.CreatedTime, D.UpdatedBy, D.UpdatedTime, D.SortBy, D.IsView, D.ViewBy, D.ViewTime , D.Phone, D.Location,D.Latitude,D.Longitude,D.DoctroRating,E.Countryname, D.Country as countryid, F.Organizationname,
                (Select Name From HC_Doctor_Departments z Where z.ID = D.Department) DepartmentName,
                E.flag as CFlag , F.logo , D.language
                FROM HC_DoctorInfo D , 
                HC_Country E, HC_Organization F
                Where  D.Country = E.ID 
                and D.organization = F.ID
                and 1=1";

            HcDoctorinfoEntity obj = new HcDoctorinfoEntity();

            if (param != null)
            {
                obj = (HcDoctorinfoEntity)param;
            }
            if (string.IsNullOrEmpty(obj.Searchflag))
            {
                if (!string.IsNullOrEmpty(obj.Department))
                {
                    sql += " And D.Department = '" + obj.Department + "'";
                }
                if (!string.IsNullOrEmpty(obj.Isactive))
                {
                    sql += " And D.IsActive = '" + obj.Isactive + "'";
                }
                if (!string.IsNullOrEmpty(obj.Isview))
                {
                    sql += " And D.IsView = '" + obj.Isview + "'";
                }
                if (!string.IsNullOrEmpty(obj.Id))
                {
                    sql += " And D.ID = '" + obj.Id + "'";
                }
                // New filter params string latitude, string longitude, string Gender, string exp, string rating

                if (!string.IsNullOrEmpty(obj.Latitude))
                {
                    sql += " And D.Latitude = '" + obj.Latitude + "'";
                }
                if (!string.IsNullOrEmpty(obj.Longitude))
                {
                    sql += " And D.Longitude = '" + obj.Longitude + "'";
                }
                //New params--------------------------------------------------------------------------
                if (!string.IsNullOrEmpty(obj.Experience))
                {
                    sql += " And D.Experience = '" + obj.Experience + "'";
                }
                if (!string.IsNullOrEmpty(obj.DoctroRating))
                {
                    sql += " And CAST(D.DoctroRating as DECIMAL(9,2))    = '" + obj.DoctroRating + "'";
                }
                if (!string.IsNullOrEmpty(obj.Gender))
                {
                    sql += " And D.Gender = '" + obj.Gender + "'";
                }
                if (!string.IsNullOrEmpty(obj.Name))
                {
                    sql += " And D.Name like  '%" + obj.Name + "%'";
                }

                if (!string.IsNullOrEmpty(obj.countryid))
                {
                    sql += " And D.Country ='" + obj.countryid + "'";
                }
                if (!string.IsNullOrEmpty(obj.ispromo))
                {
                    sql += " And D.ispromo ='" + obj.ispromo + "'";
                }

                if (!string.IsNullOrEmpty(obj.Department))
                {
                    sql += " And D.Department ='" + obj.Department + "'";
                }
                if (!string.IsNullOrEmpty(obj.Location))
                {
                    sql += " And D.Location like  '%" + obj.Location + "%'";
                }
            }
            else
            {
                sql += " And UPPER(D.Name) like  Upper('%" + obj.Name + "%')";
                sql += " OR UPPER(D.Department) like  Upper('%" + obj.Name + "%')";
            }


            // sql += string.IsNullOrEmpty(obj.Sortby) ? " Order By D.Name Asc" : " Order By D.SortBy Asc";


            DbCommand dbCommand = db.GetSqlStringCommand(sql);
            DataSet   ds        = db.ExecuteDataSet(dbCommand);

            return(ds.Tables[0]);
        }
예제 #23
0
        bool fnUserInfoSession(string Id)
        {
            bool Success = false;

            HcUsersEntity uInfo = (HcUsersEntity)ExecuteDB(HCareTaks.AG_GetSingleHcUsersRecordById, Id);

            if (uInfo != null)
            {
                Success = true;
                string uId = uInfo.Id, uName = uInfo.FirstName + " " + uInfo.LastName, uType = uInfo.Usertype, uDetlId = uInfo.Userid, uRoleId = uInfo.Roleid,
                       UserDefaultBoard = "", UserAllDashboard = "",
                       UserImage = "/Content/rkscript/docx/UserImage/NoImage.jpg";

                //................................................. Role Info
                if (uType == "Admin")
                {
                    UserDefaultBoard = "Admin";
                    List <SiteInfo> Items = SiteDashboardList();
                    foreach (SiteInfo dr in Items)
                    {
                        UserAllDashboard += dr.MenuId + ",";
                    }
                }
                else if (!string.IsNullOrEmpty(uRoleId))
                {
                    AdmRolemasterEntity sObj = (AdmRolemasterEntity)ExecuteDB(HCareTaks.AG_GetSingleAdmRolemasterRecordById, uRoleId);
                    if (sObj != null)
                    {
                        UserDefaultBoard = sObj.DefaultBoard;
                        UserAllDashboard = sObj.AllDashboard;
                    }
                }

                //................................................. User Details Info
                if (!string.IsNullOrEmpty(uDetlId))
                {
                    if (uType == "Doctor")
                    {
                        HcDoctorinfoEntity sObj = (HcDoctorinfoEntity)ExecuteDB(HCareTaks.AG_GetSingleHcDoctorinfoRecordById, uDetlId);
                        if (sObj != null && !string.IsNullOrEmpty(sObj.Photo))
                        {
                            uName = sObj.Name;
                            if (!string.IsNullOrEmpty(sObj.Photo))
                            {
                                UserImage = sObj.Photo;
                            }
                        }
                    }
                    else if (uType == "Patient")
                    {
                        //HcDoctorinfoEntity sObj = (HcDoctorinfoEntity)ExecuteDB(HCareTaks.AG_GetSingleHcDoctorinfoRecordById, uDetlId);
                        //if (sObj != null && !string.IsNullOrEmpty(sObj.Photo))
                        //{
                        //    uName = sObj.Name;
                        //    if (!string.IsNullOrEmpty(sObj.Photo)) UserImage = sObj.Photo;
                        //}
                    }
                }

                if (Success)
                {
                    //................................................. Set Sessions
                    Session["UserId"]           = uId;
                    Session["UserName"]         = uName;
                    Session["UserType"]         = uType; // Admin, Doctor, Patient, Staff
                    Session["UserRoleId"]       = uRoleId;
                    Session["UserImage"]        = UserImage;
                    Session["UserDefaultBoard"] = UserDefaultBoard;
                    Session["UserAllDashboard"] = UserDefaultBoard + "," + UserAllDashboard;

                    //................................................. Set LastLogIn Time
                    HcUsersEntity log = new HcUsersEntity();
                    log.Id        = Id;
                    log.Lastlogin = DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss");
                    log.QueryFlag = "LastLogIn";
                    ExecuteDB(HCareTaks.AG_UpdateHcUsersInfo, log);
                }
            }
            return(Success);
        }