public async Task <ActionResult <AdminDetails> > PostAdminDetails(AdminDetails adminDetails) { _context.admin.Add(adminDetails); await _context.SaveChangesAsync(); return(CreatedAtAction("GetAdminDetails", new { id = adminDetails.Id }, adminDetails)); }
public ActionResult ViewAllAdmin() { try { List <AdminDetails> LST = new List <AdminDetails>(); AdminDetails admObj = (AdminDetails)Session["UserDetails"]; if (admObj.ParentId == 0) { CardDetails(admObj.HospitalId, admObj.UserId); int HId = 0; LST = BP.GetAllAdminDetails_SA(HId); } else { CardDetails(admObj.HospitalId, admObj.UserId); LST = BP.GetAllAdminDetails_SA(admObj.HospitalId); } return(View("AllAdmin", LST)); } catch (Exception) { throw; } }
public JsonResult IncomeExpensesAnalysis4(string Id) { try { AdminDetails admObj = (AdminDetails)Session["UserDetails"]; Dashbord LST = new Dashbord(); LST = BL.ViewDashbord(admObj.HospitalId.ToString()); // var date = LST.d1lst[0].dates.ToShortDateString(); //for (int i = 0; i < LST.d5lst.Count; i++) //{ // //LST.d1lst[i].date = LST.d1lst[i].dates.ToShortDateString(); // LST.d5lst[i].date = LST.d5lst[i].dates.ToString("ddd"); //} for (int i = 0; i < LST.d5lst.Count; i++) { LST.d5lst[i].date = LST.d5lst[i].dates.ToString("ddd"); } //var output = JsonConvert.SerializeObject(LST.d1lst); //(LST.d1lst, JsonRequestBehavior.AllowGet); return(Json(LST.d5lst, JsonRequestBehavior.AllowGet)); } catch (Exception) { throw; } }
public async Task <IActionResult> PutAdminDetails(int id, AdminDetails adminDetails) { if (id != adminDetails.Id) { return(BadRequest()); } _context.Entry(adminDetails).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AdminDetailsExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public AdminDetails GetLoginUserDetails(AdminDetails ad) { try { SqlParameter[] sqlparam; sqlparam = new SqlParameter[3]; sqlparam[0] = new SqlParameter("@Flag", "1"); sqlparam[1] = new SqlParameter("@username", ad.WhatsAppNumber); sqlparam[2] = new SqlParameter("@password", ad.Passwod1); DataTable ds = CommonFunction.GetDataTable("USP_UserDetails", sqlparam, ""); AdminDetails Model = new AdminDetails(); if (ds != null && ds.Rows.Count > 0) { DataTable dt = ds; foreach (DataRow dr in dt.Rows) { CommonFunction.ReflectSingleData(Model, dr); } } return(Model); } catch (Exception Ex) { throw Ex; } }
public ActionResult ManageMedication(Medication Ob) { AdminDetails admObj = (AdminDetails)Session["UserDetails"]; PatientAllDetails patientDETAILS = (PatientAllDetails)Session["patientDetails"]; Ob.QueueId = patientDETAILS.QueueId; Ob.HospitalId = patientDETAILS.HospitalId.ToString(); Ob.CreatedBy = admObj.UserId.ToString(); Ob.PatientId = patientDETAILS.Id.ToString(); Ob.CasePaperNo = patientDETAILS.CasePapaerNo; ModelState.Clear(); int Flag = BM.ManageMedicationDetails(Ob); if (Flag > 0) { Medication ob = new Medication(); List <Medication> lstObservation = new List <Medication>(); ob = BM.GetMedicationDetails(patientDETAILS.QueueId, patientDETAILS.CasePapaerNo); lstObservation = ob.lst; return(Json(lstObservation, JsonRequestBehavior.AllowGet)); } else { return(Json("", JsonRequestBehavior.AllowGet)); } }
public ActionResult ManageEnquiryDetails(string FirstName, string LastName, string ContactNo, string EmailId, string Message) { try { AdminDetails admObj = (AdminDetails)Session["UserDetails"]; Bal_EnquiryDetails BL = new Bal_EnquiryDetails(); //string str = admObj.HostClincName.Substring(0, 3); //PD.CasePapaerNo = str; EnquiryDetails ED = new EnquiryDetails(); ED.Name = FirstName + " " + LastName; ED.LastName = LastName; ED.ContactNumbar = ContactNo; ED.Email = EmailId; ED.Note = Message; int Flag = BL.ManageEnquiryDetails(ED); if (Flag == 1) { string ADMContactNo = ConfigurationManager.AppSettings["ADMnumber"]; SMS sms = new SMS(); //sms.SendSMS(ADMContactNo, "Dear Admin, I am " + FirstName + " / " + LastName + " / " + ContactNo + " / " + EmailId + " / " + Message + " /"); sms.SendSMS(ADMContactNo, "Dear Admin, I am " + FirstName + " / " + LastName + " / " + ContactNo + " / " + EmailId + " / " + Message + " / - TECHBULB"); } return(RedirectToAction("Index", "LoginDetails")); } catch (Exception) { throw; } }
public List <AdminDetails> GetAdminDetails() { List <AdminDetails> adminDetails = new List <AdminDetails>(); try { var list = homeDAL.GetAdminDetail(); if (list.Count() > 0) { list.ForEach(x => { AdminDetails details = new AdminDetails(); details.CreatedDate = x.CreatedDate; details.Email = x.Email; details.ID = x.ID; details.Isdeleted = x.Isdeleted; details.ModifiedDate = x.ModifiedDate; details.Password = x.Password; details.PhoneNumber = x.PhoneNumber; details.Role = x.Role; details.Name = x.Name; details.UserName = x.UserName; adminDetails.Add(details); }); } } catch (Exception ex) { } return(adminDetails); }
public ActionResult GetData(int Qid, string CPno, float Bill, float paidBill, string Status) { AdminDetails admObj = (AdminDetails)Session["UserDetails"]; List <PatientDetails> LST = new List <PatientDetails>(); if (Status == "With Doctor") { Status = "1"; } else if (Status == "In Queue") { Status = "2"; } else { Status = "3"; } int flag = BP.SetStatus(Qid, CPno, Bill, paidBill, Status); if (flag != 0) { //return RedirectToAction("GetQueueList", "PatientDetails"); } PatientCount(admObj.HospitalId, admObj.UserId); //return RedirectToAction("GetQueueList", "PatientDetails"); return(Json("1", JsonRequestBehavior.AllowGet)); }
protected void btnAdminSubmit_Click(object sender, EventArgs e) { try { BALAccounts Bal = new BALAccounts(); List <AdminDetails> adminDetail = Bal.displayadmindetails(); AdminDetails adminDetails = new AdminDetails { FirstName1 = txtAdminFname.Text, LastName1 = txtAdminLname.Text, Age1 = int.Parse(txtAge.Text), Gender1 = ddlAdminGender.Text, DoB1 = txtdob.Text, ContactNumber1 = double.Parse(txtcntct.Text), AltContactNumber1 = double.Parse(txtAltcntct.Text), EmailId1 = txtEmail.Text, UserName1 = txtAdminUserName.Text, Password1 = txtPasswd.Text, Isapproved1 = false }; if (Bal.regadmin(adminDetails)) { ClientScript.RegisterStartupScript(this.GetType(), "Popup", "regalert();", true); } } catch (Exception ex) { } }
public ActionResult DeleteAppoinment(int Id, string Note, string CPno, string MbNo) { try { int hospitalId; AdminDetails admObj = (AdminDetails)Session["UserDetails"]; hospitalId = admObj.HospitalId; List <QueueDetails> LST = new List <QueueDetails>(); LST = BP.DeleteAppoinment(hospitalId, Id, Note, admObj.RoleId); if (true) { string message = "Your appoinment has been cancellled, CP no: " + CPno + ". Download 'Meet My Doctor' app to manage your health records - https://esmartdoctor.com"; sms.SendSMS(MbNo, message); } PatientCount(admObj.HospitalId, admObj.UserId); return(Json("1", JsonRequestBehavior.AllowGet)); } catch (Exception) { throw; } }
public ActionResult GetQueueList() { try { int hospitalId; // DateTime date = Convert.ToDateTime( Request["txtDate"].ToString()); AdminDetails admObj = (AdminDetails)Session["UserDetails"]; hospitalId = admObj.HospitalId; //cards counts PatientCount(hospitalId, admObj.UserId); ModelState.Clear(); List <QueueDetails> LST = new List <QueueDetails>(); if (admObj.RoleId == "AHE") { int UserId = 99999; LST = BP.GetQueueList(hospitalId, UserId, "XXX"); } if (admObj.RoleId == "ADM") { LST = BP.GetQueueList(hospitalId, admObj.UserId, "XXX"); } return(View("PatientAppoinment", LST)); } catch (Exception ex) { throw ex; } }
public ActionResult ManageSettings(Settings s) { try { AdminDetails admObj = (AdminDetails)Session["UserDetails"]; s.UserId = admObj.UserId; int flag = BL.ManageSettings(s); if (flag != 0) { Session["Language"] = s.Language; Session["VitalInformation"] = s.VitalInformation; Session["Complaints"] = s.Complaints; Session["Test"] = s.Test; Session["Diagnosis"] = s.Diagnosis; Session["Medication"] = s.Medication; Session["Observation"] = s.Observation; Session["NextVisit"] = s.NextVisit; Session["Printer"] = s.Printer; Session["Template"] = s.Template; Session["Advice"] = s.Template; } // MD = BL.ViewAllMedicine(s); return(View("Setting", s)); } catch (Exception ex) { throw; } }
public TreatmentPlanPrint(Customer c, List <TreatmentOnPlan> list, User u, AdminDetails ad) { this.Width = 780; this.Margin = new Thickness(5); this.Padding = new Thickness(5); //add border //Border border = new Border(); //this.Children.Add(border); this.BorderBrush = new SolidColorBrush(baseColor); this.BorderThickness = new Thickness(2); adminDetails = ad; this.VerticalAlignment = Windows.UI.Xaml.VerticalAlignment.Top; customer = c; user = u; InitStrings(u, c); InitGrid(); InitTreatments(list); SetTitle(); SetUserAddress(); SetDate(); SetPatientData(); //SetTreatmentNum(); SetTreatments(); }
public ActionResult ManageMedicineDetails(MedicineDetails MD) { try { AdminDetails admObj = (AdminDetails)Session["UserDetails"]; if (MD.MedicineType != "OTH") { MD.MedicineName = MD.MedicineType + " " + MD.MedicineName; } else { MD.MedicineName = MD.MedicineName; } MD.CreatedBy = admObj.UserId.ToString(); MD.HospitalId = admObj.HospitalId; int Flag = BL.ManageMedicineDetails(MD); MD = BL.ViewAllMedicine(admObj.HospitalId); ModelState.Clear(); return(View("MedicineDetails", MD)); } catch (Exception ex) { throw; } }
public AdminDetails GetDoctorUserDetails(int UserId) { try { SqlParameter[] sqlparam; sqlparam = new SqlParameter[2]; sqlparam[0] = new SqlParameter("@Flag", "2"); sqlparam[1] = new SqlParameter("@username", UserId); DataTable ds = CommonFunction.GetDataTable("USP_UserDetails", sqlparam, ""); AdminDetails Model = new AdminDetails(); if (ds != null && ds.Rows.Count > 0) { DataTable dt = ds; foreach (DataRow dr in dt.Rows) { CommonFunction.ReflectSingleData(Model, dr); } } return(Model); } catch (Exception Ex) { throw Ex; } }
public IList <AdminDetails> GetDoctorListByHID(int Hid) { try { SqlParameter[] sqlparam; sqlparam = new SqlParameter[2]; sqlparam[0] = new SqlParameter("@Flag", "1"); sqlparam[1] = new SqlParameter("@HId", Hid); DataTable ds = CommonFunction.GetDataTable("USP_Get_DoctorList", sqlparam, ""); IList <AdminDetails> lst = new List <AdminDetails>(); if (ds != null && ds.Rows.Count > 0) { DataTable dt = ds; foreach (DataRow dr in dt.Rows) { AdminDetails Model = new AdminDetails(); CommonFunction.ReflectSingleData(Model, dr); lst.Add(Model); } } return(lst); } catch (Exception Ex) { throw Ex; } }
// getting details of admin public AdminDetails DALGetAdminPackageDetails(long consignmentId) { SqlCommand _sqlCommand = new SqlCommand(); SqlConnection _sqlConnection = ConnectionHandler.GetConnection(); _sqlCommand.CommandType = CommandType.Text; _sqlCommand.Connection = _sqlConnection; _sqlCommand.CommandText = "select pk_consignment_id,pk_Package_Status from Cts_Package where pk_consignment_id = @consignmentId"; _sqlCommand.Parameters.AddWithValue("@consignmentId", consignmentId); SqlDataAdapter _sqlDataAdapter = new SqlDataAdapter(_sqlCommand); DataTable _dataTable = new DataTable(); _sqlDataAdapter.Fill(_dataTable); if (_dataTable.Rows.Count > 0) { DataRow _dataRow = _dataTable.Rows[0]; AdminDetails package_finalDetails = new AdminDetails ( long.Parse(_dataRow["pk_consignment_id"].ToString()), _dataRow["pk_Current_location"].ToString() ); return(package_finalDetails); } else { return(new AdminDetails()); } }
public AdminDetails GetDoctorDetailsById(int UserId) { try { SqlParameter[] sqlparam; sqlparam = new SqlParameter[2]; sqlparam[0] = new SqlParameter("@Flag", "2"); sqlparam[1] = new SqlParameter("@HId", UserId); DataTable ds = CommonFunction.GetDataTable("USP_Get_DoctorList", sqlparam, ""); AdminDetails lst = new AdminDetails(); if (ds != null && ds.Rows.Count > 0) { DataTable dt = ds; foreach (DataRow dr in dt.Rows) { //PatientDetails Model = new PatientDetails(); CommonFunction.ReflectSingleData(lst, dr); } } return(lst); } catch (Exception Ex) { throw Ex; } }
public ActionResult Import(HttpPostedFileBase importFile) { AdminDetails admObj = (AdminDetails)Session["UserDetails"]; if (importFile == null) { return(Json(new { Status = 0, Message = "No File Selected" })); } if (importFile.ContentLength == 0) { return(Json(new { Status = 0, Message = "Empty File Selected" })); } try { var recordsImported = BL.ImportAll(importFile.InputStream, admObj.HospitalId); return(Json(new { Status = 1, Message = string.Format("File Imported {0} records successfully ", recordsImported) })); } catch (Exception ex) { return(Json(new { Status = 0, Message = ex.Message })); } }
// the admin add the package details public void DALAdminPackageEdit(long employeeId, AdminDetails adminDetails) { SqlCommand _sqlCommand = new SqlCommand(); SqlConnection _sqlConnection = ConnectionHandler.GetConnection(); _sqlCommand.CommandType = CommandType.Text; _sqlCommand.Connection = _sqlConnection; _sqlCommand.CommandText = "update Cts_Package set pk_consignment_id = @consignment_Id,pk_Package_Status =@package_Status where pk_Customer_id = @customerId"; _sqlCommand.Parameters.AddWithValue("@consignment_Id", adminDetails.Consignment_Id); _sqlCommand.Parameters.AddWithValue("@package_Status", adminDetails.Package_Status); _sqlCommand.Parameters.AddWithValue("@customerId", employeeId); try { _sqlConnection.Open(); if (_sqlConnection.State == ConnectionState.Open) { _sqlCommand.ExecuteNonQuery(); } } catch (Exception ex) { } finally { _sqlConnection.Close(); } }
public ActionResult SetPatientAppoinment(string CPno, DateTime AppoinmentDate, string AppoinmentTime, string Note) { try { //DateTime AppoinmentDate = DateTime.Now; ////string dt = AppoinmentDate.ToString("dd/MM/yyyy"); //string AppoinmentTime = AppoinmentDate.ToString("h:mm"); //string Note = "Appoinment fixed"; AdminDetails admObj = (AdminDetails)Session["UserDetails"]; List <PatientDetails> LST = new List <PatientDetails>(); LST = BP.SetPatientAppoinment(CPno, AppoinmentDate, AppoinmentTime, Note); //if (LST != null) //{ // SMS sms = new SMS(); // sms.SendSMS(admObj.WhatsAppNumber,"Dear "+admObj.FirstName+", your appoinment booked sucecessfuly "+ AppoinmentDate + " at "+ AppoinmentTime + "against Case Paper no "+ CPno + ", Download app for better helth ..."); //} PatientCount(admObj.HospitalId, admObj.UserId); return(Json("1", JsonRequestBehavior.AllowGet)); //return RedirectToAction("GetQueueList", "PatientDetails"); } catch (Exception) { throw; } }
public ActionResult ViewAllStaff() { try { List <ReceptionStaffReg> LST = new List <ReceptionStaffReg>(); AdminDetails admObj = (AdminDetails)Session["UserDetails"]; if (admObj.ParentId == 0) { StaffCount(admObj.HospitalId, admObj.UserId); int HId = 0; LST = BP.GetStaffDetails(HId); } else { StaffCount(admObj.HospitalId, admObj.UserId); LST = BP.GetStaffDetails(admObj.HospitalId); } return(View("AllStaff", LST)); } catch (Exception) { throw; } }
public void InsertTable(AdminDetails admindetails, string query, bool isStoreProcedure) { try { con.Open(); com = new SqlCommand(query, con); com.Parameters.Add("@adminname", SqlDbType.NVarChar).Value = admindetails.AdminName; com.Parameters.Add("@password", SqlDbType.NVarChar).Value = admindetails.AdminPassword; com.Parameters.Add("@schoolid", SqlDbType.Int).Value = admindetails.SchoolId; if (isStoreProcedure) { com.CommandType = CommandType.StoredProcedure; } else { com.CommandType = CommandType.Text; } com.ExecuteNonQuery(); } catch (Exception ex) { System.Diagnostics.Debug.WriteLine("Error inside SqlHelper class in NonQuery as {0}", ex.Message); } finally { con.Close(); //com.Parameters.Clear(); // parameters.Clear(); } }
public ActionResult Setting() { AdminDetails admObj = (AdminDetails)Session["UserDetails"]; Settings s = new Settings(); s = BL.GetSettings(admObj.UserId); return(View("Setting", s)); }
public void PatientCount(int Hid, int UserId) { AdminDetails admObj = (AdminDetails)Session["UserDetails"]; int flag = 1; if (admObj.RoleId == "AHE") { flag = 2; } else { flag = 1; } DataSet ds = BP.CountForCards(Hid, UserId, flag); if (ds.Tables[0].Rows[0][0].ToString() == null) { Session["TodayAppointment"] = "0"; } else { Session["TodayAppointment"] = ds.Tables[0].Rows[0][0].ToString(); } if (ds.Tables[1].Rows[0][0].ToString() == null) { Session["TodayNewPatient"] = "0"; } else { Session["TodayNewPatient"] = ds.Tables[1].Rows[0][0].ToString(); } if (ds.Tables[2].Rows[0][0].ToString() == null) { Session["YesterdayPatients"] = "0"; } else { Session["YesterdayPatients"] = ds.Tables[2].Rows[0][0].ToString(); } if (ds.Tables[3].Rows[0][0].ToString() == null) { Session["TotalPatientCount"] = "0"; } else { Session["TotalPatientCount"] = ds.Tables[3].Rows[0][0].ToString(); } if (ds.Tables[4].Rows[0][0].ToString() == null) { Session["TodaysNewPatientCount"] = "0"; } else { Session["TodaysNewPatientCount"] = ds.Tables[4].Rows[0][0].ToString(); } }
public IActionResult Profile() { if (!string.IsNullOrEmpty(HttpContext.Session.GetString("AdminId"))) { AdminDetails model = _operation.GetAdminDetails(HttpContext.Session.GetString("AdminId")); return(View(model)); } return(RedirectToAction("Index", "AdminLogin")); }
public JsonResult GetMedicineName(string str) { AdminDetails admObj = (AdminDetails)Session["UserDetails"]; MedicineDetails MD = new MedicineDetails(); MD = BL.ViewAllMedicine(admObj.HospitalId); var mName = (from x in MD.lst where x.MedicineName.StartsWith(str) select new { label = x.MedicineName }).ToList(); return(Json(mName)); }
//Forgot Password public AdminDetails CheckAdminExitsSendPassword(string id) { AdminDetails details = _context.AdminDetails.Where(x => x.Email == id).FirstOrDefault(); if (details != null) { return(details); } return(null); }
public ActionResult DeleteExpenses(int Id) { AdminDetails admObj = (AdminDetails)Session["UserDetails"]; ExpensesDetails ED = new ExpensesDetails(); // ED = BL.ViewAllMedicine(); int Flag1 = BL.DeleteExpences(Id); ED = BL.ViewAllExpenses(admObj.HospitalId); return(View("AccountDetails", ED)); }