private void BindIndividualSMSSearch(bool isBind) { DataTable dtIndividualSMS = new AdministrationBAL().GetSMSIndividual(); foreach (DataRow dr in dtIndividualSMS.Rows) { dr["CreatedOn"] = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(Convert.ToDateTime(dr["CreatedOn"]), "India Standard Time"); } dtIndividualSMS.AcceptChanges(); rgSMSIndividual.DataSource = dtIndividualSMS; if (!isBind) rgSMSIndividual.DataBind(); }
private void BindPatientSearch(bool isBind) { DataTable dtRemainderSMS = new AdministrationBAL().GetRemainderSMS(); foreach (DataRow dr in dtRemainderSMS.Rows) { dr["Sent On"] = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(Convert.ToDateTime(dr["Sent On"]), "India Standard Time"); } dtRemainderSMS.AcceptChanges(); rgRemainderSMS.DataSource = dtRemainderSMS; if (!isBind) rgRemainderSMS.DataBind(); }
private void BindAppointment(bool isBind) { DataTable dtAppointmentView = new AdministrationBAL().GetAppointmentview(); foreach (DataRow drAppointmentView in dtAppointmentView.Rows) { if (!string.IsNullOrEmpty(drAppointmentView["ScheduleAddress"].ToString())) drAppointmentView["ScheduleAddress"] = drAppointmentView["ScheduleAddress"].ToString().Replace("\r\n\r\n", "\n").Replace("\r\n", "\n").Replace("\n\n", "\n").Replace("\n", ", \n"); else { StringBuilder ScheduleAddress = new StringBuilder(); ScheduleAddress.AppendLine(drAppointmentView["OrganizationName"].ToString()); ScheduleAddress.AppendLine((!string.IsNullOrEmpty(drAppointmentView["AddressLine2"].ToString())) ? " \n" + drAppointmentView["AddressLine1"].ToString() + " \n" + drAppointmentView["AddressLine2"].ToString() : " \n" + drAppointmentView["AddressLine1"].ToString()); ScheduleAddress.AppendLine((!string.IsNullOrEmpty(drAppointmentView["CityName"].ToString())) ? " \n" + drAppointmentView["CityName"].ToString() : string.Empty); ScheduleAddress.AppendLine((!string.IsNullOrEmpty(drAppointmentView["StateName"].ToString())) ? " \n" + drAppointmentView["StateName"].ToString() : string.Empty); ScheduleAddress.AppendLine((!string.IsNullOrEmpty(drAppointmentView["CountryName"].ToString())) ? " \n" + drAppointmentView["CountryName"].ToString() : string.Empty); ScheduleAddress.AppendLine((!string.IsNullOrEmpty(drAppointmentView["PostalCode"].ToString())) ? " \nPostalCode:" + drAppointmentView["PostalCode"].ToString() : string.Empty); ScheduleAddress.AppendLine((!string.IsNullOrEmpty(drAppointmentView["Phone"].ToString())) ? " \nPhone: " + drAppointmentView["Phone"].ToString() : string.Empty); drAppointmentView["ScheduleAddress"] = ScheduleAddress.ToString(); } drAppointmentView["CreatedOn"] = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(Convert.ToDateTime(drAppointmentView["CreatedOn"]), "India Standard Time"); } dtAppointmentView.AcceptChanges(); rgAdminAppointmentView.DataSource = dtAppointmentView; if (!isBind) rgAdminAppointmentView.DataBind(); }
private void BindHospital(bool IsRebind) { DataTable dtDepartment = new AdministrationBAL().GetHospital(); dtDepartment.Columns.Add("Address", typeof(string)); foreach (DataRow dr in dtDepartment.Rows) { if (!string.IsNullOrEmpty(dr["AddressLine"].ToString())) dr["Address"] += dr["AddressLine"].ToString(); if (!string.IsNullOrEmpty(dr["CityName"].ToString())) dr["Address"] += ", " + dr["CityName"].ToString(); if (!string.IsNullOrEmpty(dr["StateName"].ToString())) dr["Address"] += ", " + dr["StateName"].ToString(); if (!string.IsNullOrEmpty(dr["CountryName"].ToString())) dr["Address"] += ", " + dr["CountryName"].ToString(); if (!string.IsNullOrEmpty(dr["PostalCode"].ToString())) dr["Address"] += ", " + dr["PostalCode"].ToString(); } dtDepartment.AcceptChanges(); rgAdminHospitalList.DataSource = dtDepartment; if (!IsRebind) rgAdminHospitalList.DataBind(); }
protected void rgAdminHospitalList_DetailTableDataBind(object source, Telerik.Web.UI.GridDetailTableDataBindEventArgs e) { GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem; string mobileId = dataItem.GetDataKeyValue("Mobile").ToString(); DataTable dtDepartment = new AdministrationBAL().GetExistingHospital(mobileId); dtDepartment.Columns.Add("Address", typeof(string)); foreach (DataRow dr in dtDepartment.Rows) { if (!string.IsNullOrEmpty(dr["AddressLine"].ToString())) dr["Address"] += dr["AddressLine"].ToString(); if (!string.IsNullOrEmpty(dr["CityName"].ToString())) dr["Address"] += ", " + dr["CityName"].ToString(); if (!string.IsNullOrEmpty(dr["StateName"].ToString())) dr["Address"] += ", " + dr["StateName"].ToString(); if (!string.IsNullOrEmpty(dr["CountryName"].ToString())) dr["Address"] += ", " + dr["CountryName"].ToString(); if (!string.IsNullOrEmpty(dr["PostalCode"].ToString())) dr["Address"] += ", " + dr["PostalCode"].ToString(); } dtDepartment.AcceptChanges(); e.DetailTableView.DataSource = dtDepartment; //if (!IsRebind) // rgAdminHospitalList.DataBind(); }