or
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="STSchedule.aspx.vb" Inherits="ScheduleUser_STSchedule" %><%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %><asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server"> <link href="../Styles.css" rel="stylesheet" type="text/css" /> <style type="text/css"> .style3 { width: 165px; height: 120px; }</style></asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server"> <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server"> </telerik:RadStyleSheetManager> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> <Scripts> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js"> </asp:ScriptReference> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js"> </asp:ScriptReference> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js"> </asp:ScriptReference> </Scripts> </telerik:RadScriptManager> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> </telerik:RadAjaxManager> <div id="content-container1"> <div id="content-container2"> <div id="section-navigation"> <img alt="h2t" class="style3" src="../Pics/logoh2t.png" /> <telerik:RadTabStrip ID="RadTabStrip1" runat="server" Skin="Transparent" Width="161px" SelectedIndex="2" > <Tabs> <telerik:RadTab runat="server" Text="PT" NavigateUrl="~/ScheduleUser/PTSchedule.aspx"> </telerik:RadTab> <telerik:RadTab runat="server" Text="OT" NavigateUrl="~/ScheduleUser/OTSchedule.aspx"> </telerik:RadTab> <telerik:RadTab runat="server" Text="ST" Selected="True" NavigateUrl="~/ScheduleUser/STSchedule.aspx"> </telerik:RadTab> <telerik:RadTab runat="server" Text="MT" NavigateUrl="~/ScheduleUser/MTSchedule.aspx"> </telerik:RadTab> <telerik:RadTab runat="server" Text="Patients" NavigateUrl="~/ScheduleUser/Schedule.aspx"> </telerik:RadTab> </Tabs> </telerik:RadTabStrip> <asp:ListBox ID="ListBox1" runat="server" BackColor="#99CCFF" DataSourceID="SqlDataSource6" DataTextField="TherapistName" DataValueField="EmployeeID" Rows="30" Width="161px" AutoPostBack="True"></asp:ListBox> <asp:SqlDataSource ID="SqlDataSource6" runat="server" ConnectionString="<%$ ConnectionStrings:H2T2SQLConnectionString %>" SelectCommand="SELECT EmployeeID, TherapistFirstName, TherapistLastName, Occupation, TherapistLastName + ' ' + TherapistFirstName + ' ' + Occupation AS TherapistNameFROM TherapistWHERE (Occupation = N'SLP') OR (Occupation = N'SLPA')ORDER BY TherapistLastName"></asp:SqlDataSource></div><div id="content"> <telerik:RadScheduler ID="RadScheduler1" runat="server" Skin="Vista" DataEndField="EndTime" DataKeyField="ApptID" DataSourceID="SqlDataSource1" DataStartField="StartTime" DataSubjectField="Subject" DayEndTime="21:00:00" DisplayRecurrenceActionDialogOnMove="True" Height="700px" SelectedView="WeekView" ShowAllDayRow="False" ShowFooter="False" TimeZoneID="US Mountain Standard Time" TimeZoneOffset="-07:00:00" WorkDayEndTime="18:00:00" DataDescriptionField="Description" EnableDescriptionField="True" DataRecurrenceField="Recurrence" DataRecurrenceParentKeyField="RecurrencePartentID" DataReminderField="Reminder" style="margin-left: 3px" HoursPanelTimeFormat="htt" TimeLabelRowSpan="1"> <ResourceTypes> <telerik:ResourceType DataSourceID="SqlDataSource2" ForeignKeyField="PatientID" KeyField="PatientID" Name="Patient" TextField="PatientName" /> <telerik:ResourceType DataSourceID="SqlDataSource5" ForeignKeyField="StatusID" KeyField="ReasonID" Name="Status" TextField="Appointment" /> <telerik:ResourceType DataSourceID="SqlDataSource7" ForeignKeyField="TherapistID" KeyField="EmployeeID" Name="Theraist" TextField="TherapistName" /> </ResourceTypes> <AppointmentTemplate> <div class="AppointmentTemplate <%# Eval("Status.Text") %>"> <h4><%# Eval("Subject") %></h4> </div> </AppointmentTemplate> <Localization HeaderTimeline="All Therapist " HeaderToday="Today" /> <TimelineView GroupBy="Therapist" GroupingDirection="Vertical" /> <MultiDayView ShowHoursColumn="False" /> <Reminders Enabled="True" /> </telerik:RadScheduler> </div> </div> </div> <asp:SqlDataSource ID="SqlDataSource5" runat="server" ConnectionString="<%$ ConnectionStrings:H2T2SQLConnectionString %>" SelectCommand="SELECT [Appointment], [ReasonID] FROM [StatusInfo]"> </asp:SqlDataSource> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:Insurance InfoConnectionString1 %>" SelectCommand="SELECT ApptID, RecurrencePartentID, PatientID, TherapistID, StatusID, TimeZoneID, StartTime, EndTime, Subject, Description, Reminder, Recurrence, LastModified FROM Schedule WHERE (TherapistID = @TherapistID)" DeleteCommand="DELETE FROM [Schedule] WHERE [ApptID] = @ApptID" InsertCommand="INSERT INTO [Schedule] ([RecurrencePartentID], [PatientID], [TherapistID], [StatusID], [TimeZoneID], [StartTime], [EndTime], [Subject], [Description], [Reminder], [Recurrence], [LastModified]) VALUES (@RecurrencePartentID, @PatientID, @TherapistID, @StatusID, @TimeZoneID, @StartTime, @EndTime, @Subject, @Description, @Reminder, @Recurrence, @LastModified)" UpdateCommand="UPDATE [Schedule] SET [RecurrencePartentID] = @RecurrencePartentID, [PatientID] = @PatientID, [TherapistID] = @TherapistID, [StatusID] = @StatusID, [TimeZoneID] = @TimeZoneID, [StartTime] = @StartTime, [EndTime] = @EndTime, [Subject] = @Subject, [Description] = @Description, [Reminder] = @Reminder, [Recurrence] = @Recurrence, [LastModified] = @LastModified WHERE [ApptID] = @ApptID"> <DeleteParameters> <asp:Parameter Name="ApptID" Type="Int32" /> </DeleteParameters> <InsertParameters> <asp:Parameter Name="RecurrencePartentID" Type="Int32" /> <asp:Parameter Name="PatientID" Type="Int32" /> <asp:Parameter Name="TherapistID" Type="Int32" /> <asp:Parameter Name="StatusID" Type="Int32" /> <asp:Parameter Name="TimeZoneID" Type="String" /> <asp:Parameter Name="StartTime" Type="DateTime" /> <asp:Parameter Name="EndTime" Type="DateTime" /> <asp:Parameter Name="Subject" Type="String" /> <asp:Parameter Name="Description" Type="String" /> <asp:Parameter Name="Reminder" Type="String" /> <asp:Parameter Name="Recurrence" Type="String" /> <asp:Parameter Name="LastModified" Type="String" /> </InsertParameters> <SelectParameters> <asp:ControlParameter ControlID="ListBox1" Name="TherapistID" PropertyName="SelectedValue" Type="Int32" /> </SelectParameters> <UpdateParameters> <asp:Parameter Name="RecurrencePartentID" Type="Int32" /> <asp:Parameter Name="PatientID" Type="Int32" /> <asp:Parameter Name="TherapistID" Type="Int32" /> <asp:Parameter Name="StatusID" Type="Int32" /> <asp:Parameter Name="TimeZoneID" Type="String" /> <asp:Parameter Name="StartTime" Type="DateTime" /> <asp:Parameter Name="EndTime" Type="DateTime" /> <asp:Parameter Name="Subject" Type="String" /> <asp:Parameter Name="Description" Type="String" /> <asp:Parameter Name="Reminder" Type="String" /> <asp:Parameter Name="Recurrence" Type="String" /> <asp:Parameter Name="LastModified" Type="String" /> <asp:Parameter Name="ApptID" Type="Int32" /> </UpdateParameters> </asp:SqlDataSource> <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:H2T2SQLConnectionString %>" SelectCommand="SELECT PatientID, PatientFirstName, PatientLastName, PatientDOB, PatientLastName + ' ' + PatientFirstName AS PatientName FROM Patients ORDER BY PatientLastName"> </asp:SqlDataSource> <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:H2T2SQLConnectionString %>" SelectCommand="SELECT EmployeeID, TherapistFirstName, TherapistLastName, Occupation, TherapistLastName + ' ' + TherapistFirstName + ' ' + Occupation AS TherapistName FROM Therapist WHERE (Occupation = N'SLP') OR (Occupation = N'SLPA') ORDER BY TherapistLastName"> </asp:SqlDataSource> <asp:SqlDataSource ID="SqlDataSource7" runat="server" ConnectionString="<%$ ConnectionStrings:H2T2SQLConnectionString %>" SelectCommand="SELECT EmployeeID, TherapistFirstName + ' ' + TherapistLastName AS TherapistName FROM Therapist WHERE (EmployeeID = @EmployeeID)"> <SelectParameters> <asp:ControlParameter ControlID="ListBox1" DefaultValue="32" Name="EmployeeID" PropertyName="SelectedValue" /> </SelectParameters> </asp:SqlDataSource> <asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$ ConnectionStrings:H2T2SQLConnectionString %>" SelectCommand="SELECT Appointment FROM StatusInfo WHERE (NOT (Appointment IS NULL))"> </asp:SqlDataSource></asp:Content>
Hi Guys,
At first , please let me simply introduce my project state .
server-side : wcf service (data service layer \ data interface layer)
client-side : silverlight4.0 (referred assembly: Telerik.Windows.Controls 2011.2.712.1040 \Telerik.Windows.Controls.GridView 2011.2.712.1040)
About GridView Export Function , please see the following main code :
SaveFileDialog dialog = new SaveFileDialog(); dialog.DefaultExt = extension; dialog.Filter = String.Format("{1} files (*.{0})|*.{0}|All files (*.*)|*.*", extension, selectedItem); dialog.FilterIndex = 1; if (dialog.ShowDialog() == true) { using (Stream stream = dialog.OpenFile()) { GridViewExportOptions exportOptions = new GridViewExportOptions(); exportOptions.Format = format; exportOptions.ShowColumnHeaders = true; radgridview.Export(stream, exportOptions); } } At this moment , the issue i have faced was the datetime value displayed abnormally . please see the illustration by attachment.
Should I set the gridview some export option or else ? How to solve it ?
please give me some advices , I am looking forward to your help .
thanks.
if (e.CommandName == "Ver") { string Servidor = Request.Url.GetLeftPart(UriPartial.Authority); string fullUrl = Servidor + Session["strUrl"]; OpenFile(fullUrl); }var usuarioSesion = (Usuario)Session["usuarioSesion"]; var dbContext = new BD_SSEGUAEntities(); string strUrl; int exp = Convert.ToInt32(Session["ExpEmp"]); int folio = Convert.ToInt32(Session["Foliosol"]); var newDoc = new Documento(); foreach (UploadedFile file in RadUpload1.UploadedFiles) { // var ResultSol = new Solicitud(); var fileName = folio + "-" + file.GetName().ToLower(); file.SaveAs(MapPath(@"~/docs/" + fileName)); strUrl = "/docs/" + fileName; //MapPath(@"/docs/")+file.GetName();// + ResultSol.fiIdSolicitud + "-" + if (RadUpload1.InvalidFiles.Count == 0 && RadComboBox1.SelectedValue!=null ) { try { var doc = new Documento { fiIdSolicitud = folio, fiAnioSolicitud = (short) DateTime.Now.Year, fiIdTipoDocumento = (byte) TipoDoc, fiIdEdoDocto = 1, fdFchRegDocto = DateTime.Now, fiUsrRegDocto = usuarioSesion.Expediente, fcURLdocumento = strUrl, }; dbContext.Documento.AddObject(doc); dbContext.SaveChanges(); Alerta("El documento se guardó de forma correcta"); } catch (Exception ex) { Alerta(ex.Message); } llenaGridDocs(); } else { Alerta("Captura los todos los datos"); } // else //{ // Alerta("Agrega un documento"); //} } } <div id="form"> <form method="post" action=" somefile.php " name="profile" enctype="multipart/form-data" onsubmit="xmlhttpPost('somefile.php', 'profile', 'MyResult'); return false;" "> <label for="Upload Image">Upload Image</label> <input name="file_name" type="file"> <div class="input-row"><label for="mail">E-mail: </label><input id="mail" name="mail" type="text" /></div> <input name="upload" value="Upload" type="submit"> </form></div><!-- end form --><div id="MyResult"></div><?php include_once( 'class/class.upload.php' ); if(isset($_POST['upload'])){ $filname=$_FILES['file_name']; $handle = new upload($filname); $handle->allowed = array('image/*'); if($handle->uploaded){ $handle->image_border = 5; // defining border width $handle->image_border_color = '#000'; // defining border color $handle->image_watermark = 'badge.png'; // watermark image src $handle->image_watermark_position = 'BR'; // watermark image position again "B" for bottom and so on. $handle->image_resize = true; // making resize function to true $handle->image_x = 160; // making width to 160px $handle->image_y = 160; // making hight to 160px $handle->process('uploads/'); if ($handle->processed) { //$message = '<div class="center"><p>Border color #F58462 added successfully</p><img src="uploads/'.$handle->file_dst_name.'" alt="" /></div>'; //*** Uniqid Session ***// $strSid = md5(uniqid(time())); $to = $_POST['mail']; $from = 'adamkischi@gmail.com'; $subject = 'the subject'; $headers = 'From: '.$from. "\r\n" . 'Reply-To: '.$from. "\r\n"; $headers .= "MIME-Version: 1.0\n"; $headers .= "Content-Type: multipart/mixed; boundary=\"".$strSid."\"\n\n"; $headers .= "This is a multi-part message in MIME format.\n"; $headers .= "--".$strSid."\n"; $headers .= "Content-type: text/html; charset=utf-8\n"; $headers .= "Content-Transfer-Encoding: 7bit\n\n"; if($_FILES["file_name"]["name"] != "") { $strFilesName = $_FILES["file_name"]["name"]; $strContent = chunk_split(base64_encode(file_get_contents('uploads/'.$strFilesName))); $headers .= "--".$strSid."\n"; $headers .= "Content-Type: application/octet-stream; name=\"".$strFilesName."\"\n"; $headers .= "Content-Transfer-Encoding: base64\n"; $headers .= "Content-Disposition: attachment; filename=\"".$strFilesName."\"\n\n"; $headers .= $strContent."\n\n"; } $flgSend = @mail($to, $subject, $message, $headers); // @ = No Show Error // if($flgSend){echo "Mail send completed.";$tmpfile = 'uploads/'.$strFilesName;if(file_exists($tmpfile)) {unlink($tmpfile);}}else{echo "Cannot send mail.";} } } }?>$(".profile").colorbox( {width:"80%", height:"80%"} );// X Axis propertieschart.PlotArea.XAxis.VisibleValues = ChartAxisVisibleValues.Positive;chart.PlotArea.XAxis.Step = 1;chart.PlotArea.XAxis.LabelStep = 2;chart.PlotArea.XAxis.IsZeroBased = false;chart.PlotArea.XAxis.AutoScale = false;chart.PlotArea.XAxis.Appearance.ValueFormat = ChartValueFormat.General;