public int SaveDoctor(DoctorDO d) { try { int doctorId = _objDoctorDAL.SaveDoctor(d.DoctorId, d.OrganizationId, d.DoctorName, d.DateofBirth, d.Gender, d.UniversityId, d.RegistrationYear, d.RegistrationNumber, d.Experience, d.Degrees, d.Certifications, d.PhotoName, d.Mobile, d.DepartmentId, d.PreferredName, d.LoginNew.EmailId, d.LoginNew.Password, d.LoginNew.TransactionToken, d.ReferenceToken, d.CountryId, d.IsActivated); return(doctorId); } catch { return(0); } }
public DoctorDO GetDoctor(string signInId) { DataTable dtDoctor = _objDoctorDAL.GetDoctor(signInId); DoctorDO d = null; if (dtDoctor.Rows.Count > 0) { LoginNewDO l = new LoginNewDO(); l.LoginId = Convert.ToInt32(dtDoctor.Rows[0]["LoginId"].ToString()); l.MobileId = dtDoctor.Rows[0]["MobileId"].ToString(); l.MedAppId = dtDoctor.Rows[0]["MedAppId"].ToString(); l.EmailId = dtDoctor.Rows[0]["EmailId"].ToString(); l.Password = "******"; l.CreatedOn = Convert.ToDateTime(dtDoctor.Rows[0]["CreatedOn"].ToString()); l.IsDeleted = Convert.ToBoolean(dtDoctor.Rows[0]["IsDeleted"].ToString()); d = new DoctorDO(); d.DoctorId = Convert.ToInt32(dtDoctor.Rows[0]["DoctorId"].ToString()); d.OrganizationId = Convert.ToInt32(dtDoctor.Rows[0]["OrganizationId"].ToString()); d.DoctorName = dtDoctor.Rows[0]["DoctorName"].ToString(); if (!string.IsNullOrEmpty(dtDoctor.Rows[0]["DateofBirth"].ToString())) { d.DateofBirth = Convert.ToDateTime(dtDoctor.Rows[0]["DateofBirth"].ToString()); } else { d.DateofBirth = null; } d.Gender = Convert.ToBoolean(dtDoctor.Rows[0]["Gender"].ToString()); d.UniversityId = Convert.ToInt32(dtDoctor.Rows[0]["UniversityId"].ToString()); d.RegistrationYear = Convert.ToInt32(dtDoctor.Rows[0]["RegistrationYear"].ToString()); d.RegistrationNumber = dtDoctor.Rows[0]["RegistrationNumber"].ToString(); d.Experience = Convert.ToDecimal(dtDoctor.Rows[0]["Experience"].ToString()); d.Degrees = dtDoctor.Rows[0]["Degrees"].ToString(); d.Certifications = dtDoctor.Rows[0]["Certifications"].ToString(); d.PhotoName = dtDoctor.Rows[0]["PhotoName"].ToString(); d.Mobile = dtDoctor.Rows[0]["Mobile"].ToString(); d.DepartmentId = Convert.ToInt32(dtDoctor.Rows[0]["DepartmentId"].ToString()); d.DepartmentName = dtDoctor.Rows[0]["DepartmentName"].ToString(); d.PreferredName = dtDoctor.Rows[0]["PreferredName"].ToString(); d.ReferenceToken = dtDoctor.Rows[0]["ReferenceToken"].ToString(); d.CountryId = Convert.ToInt32(dtDoctor.Rows[0]["CountryId"]); d.IsActivated = Convert.ToBoolean(dtDoctor.Rows[0]["IsActivated1"]); d.LoginNew = l; } return(d); }
public DoctorDO GetDoctor(string signInId) { DataTable dtDoctor = _objDoctorDAL.GetDoctor(signInId); DoctorDO d = null; if (dtDoctor.Rows.Count > 0) { LoginNewDO l = new LoginNewDO(); l.LoginId = Convert.ToInt32(dtDoctor.Rows[0]["LoginId"].ToString()); l.MobileId = dtDoctor.Rows[0]["MobileId"].ToString(); l.MedAppId = dtDoctor.Rows[0]["MedAppId"].ToString(); l.EmailId = dtDoctor.Rows[0]["EmailId"].ToString(); l.Password = "******"; l.CreatedOn = Convert.ToDateTime(dtDoctor.Rows[0]["CreatedOn"].ToString()); l.IsDeleted = Convert.ToBoolean(dtDoctor.Rows[0]["IsDeleted"].ToString()); d = new DoctorDO(); d.DoctorId = Convert.ToInt32(dtDoctor.Rows[0]["DoctorId"].ToString()); d.OrganizationId = Convert.ToInt32(dtDoctor.Rows[0]["OrganizationId"].ToString()); d.DoctorName = dtDoctor.Rows[0]["DoctorName"].ToString(); if (!string.IsNullOrEmpty(dtDoctor.Rows[0]["DateofBirth"].ToString())) d.DateofBirth = Convert.ToDateTime(dtDoctor.Rows[0]["DateofBirth"].ToString()); else d.DateofBirth = null; d.Gender = Convert.ToBoolean(dtDoctor.Rows[0]["Gender"].ToString()); d.UniversityId = Convert.ToInt32(dtDoctor.Rows[0]["UniversityId"].ToString()); d.RegistrationYear = Convert.ToInt32(dtDoctor.Rows[0]["RegistrationYear"].ToString()); d.RegistrationNumber = dtDoctor.Rows[0]["RegistrationNumber"].ToString(); d.Experience = Convert.ToDecimal(dtDoctor.Rows[0]["Experience"].ToString()); d.Degrees = dtDoctor.Rows[0]["Degrees"].ToString(); d.Certifications = dtDoctor.Rows[0]["Certifications"].ToString(); d.PhotoName = dtDoctor.Rows[0]["PhotoName"].ToString(); d.Mobile = dtDoctor.Rows[0]["Mobile"].ToString(); d.DepartmentId = Convert.ToInt32(dtDoctor.Rows[0]["DepartmentId"].ToString()); d.DepartmentName = dtDoctor.Rows[0]["DepartmentName"].ToString(); d.PreferredName = dtDoctor.Rows[0]["PreferredName"].ToString(); d.ReferenceToken = dtDoctor.Rows[0]["ReferenceToken"].ToString(); d.CountryId = Convert.ToInt32(dtDoctor.Rows[0]["CountryId"]); d.IsActivated = Convert.ToBoolean(dtDoctor.Rows[0]["IsActivated1"]); d.LoginNew = l; } return d; }
public int SaveDoctor(DoctorDO d) { try { int doctorId = _objDoctorDAL.SaveDoctor(d.DoctorId, d.OrganizationId, d.DoctorName, d.DateofBirth, d.Gender, d.UniversityId, d.RegistrationYear, d.RegistrationNumber, d.Experience, d.Degrees, d.Certifications, d.PhotoName, d.Mobile, d.DepartmentId, d.PreferredName, d.LoginNew.EmailId, d.LoginNew.Password, d.LoginNew.TransactionToken, d.ReferenceToken, d.CountryId, d.IsActivated); return doctorId; } catch { return 0; } }