or



.ruBrowse{ background-position: 0 -46px !important; width: 117px !important;}.RadAsyncUpload{ height: 25px !important;}.RadUpload { text-align: left; width: 117px;}
01.protected void RadScheduler1_AppointmentDataBound(object sender, SchedulerEventArgs e)02. {03. 04. e.Appointment.ToolTip = e.Appointment.Subject + ": " + e.Appointment.Description;05. 06. if (e.Appointment.Attributes["JobStatusID"] == COMMON.Enumerations.JobStatusEnum.BOOKING.ToString())07. {08. e.Appointment.AllowDelete = true;09. }10. else if (e.Appointment.Attributes["JobStatusID"] != COMMON.Enumerations.JobStatusEnum.COMPLETED.ToString() || e.Appointment.Attributes["JobStatusID"] != COMMON.Enumerations.JobStatusEnum.CANCELLEDBYADMINISTRATOR.ToString() || e.Appointment.Attributes["JobStatusID"] != COMMON.Enumerations.JobStatusEnum.CANCELLEDBYMOBILE.ToString() || e.Appointment.Attributes["JobStatusID"] != COMMON.Enumerations.JobStatusEnum.CLOSED.ToString())11. {12. string colorValue = COMMON.Enumerations.GetJobStatusColor((COMMON.Enumerations.JobStatusEnum)int.Parse(e.Appointment.Attributes["JobStatusID"]));13. e.Appointment.BackColor = Color.FromName(colorValue);14. e.Appointment.AllowDelete = false;15. e.Appointment.AllowEdit = false;16. //e.Appointment.Attributes.CssStyle.Add("rsAptDelete ", "display:none !important;");17. }18. else19. {20. string colorValue = COMMON.Enumerations.GetJobStatusColor((COMMON.Enumerations.JobStatusEnum)int.Parse(e.Appointment.Attributes["JobStatusID"]));21. e.Appointment.BackColor = Color.FromName(colorValue);22. e.Appointment.AllowDelete = false;23. e.Appointment.AllowEdit = true;24. //e.Appointment.Attributes.CssStyle.Add("rsAptDelete ", "display:none !important;");25. }26. }<telerik:RadGrid ID="rgvEdit" runat="server" AutoGenerateColumns="False" CellSpacing="0" allowpaging="True" PageSize="75" GridLines="None" style="margin-top: 0px" RegisterWithScriptManager="False" DataSourceID="dsGetChargeForms"> <MasterTableView NoMasterRecordsText="No locations found." CommandItemDisplay="Top" PageSize="75" AllowPaging="true" AllowSorting="false" DataKeyNames="id" InsertItemPageIndexAction="ShowItemOnCurrentPage"> <CommandItemSettings ShowAddNewRecordButton="true" AddNewRecordText="Add New" ShowRefreshButton="false"/> <Columns> <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn"/> <telerik:GridBoundColumn HeaderText="Subcategory" DataField="subcategory" UniqueName="subcategory" /> <telerik:GridBoundColumn DataField="bar_procedure_code" HeaderText="Proc Code"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="display_code" HeaderText="Display Code" SortExpression="display_code" UniqueName="display_code"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="description" HeaderText="Description" SortExpression="description" UniqueName="description"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="min" HeaderText="Min" SortExpression="min" UniqueName="min"></telerik:GridBoundColumn> <telerik:GridCheckBoxColumn DataField="requires_modifier" DataType="System.Boolean" HeaderText="Modifer?" SortExpression="requires_modifier" UniqueName="requires_modifier"></telerik:GridCheckBoxColumn> <telerik:GridCheckBoxColumn DataField="requires_epsdt" DataType="System.Boolean" HeaderText="EPSDT?" SortExpression="requires_epsdt" UniqueName="requires_epsdt"></telerik:GridCheckBoxColumn> <telerik:GridCheckBoxColumn DataField="requires_contraceptive_mgmnt" DataType="System.Boolean" HeaderText="Cont. Mgmt?" SortExpression="requires_contraceptive_mgmnt" UniqueName="requires_contraceptive_mgmnt"></telerik:GridCheckBoxColumn> <telerik:GridCheckBoxColumn DataField="no_md_charge" DataType="System.Boolean" HeaderText="No MD?" HeaderTooltip="No MD Charge" UniqueName="no_md_charge"></telerik:GridCheckBoxColumn> <telerik:GridButtonColumn Text="Delete" CommandName="Delete" ButtonType="ImageButton" /> </Columns> <EditFormSettings UserControlName="OutptMgmtEditChgFormDetail.ascx" EditFormType="WebUserControl" EditColumn-UniqueName="OutptMgmtEditChgFormDetailCommand1"> </EditFormSettings> </MasterTableView> <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"> </HeaderContextMenu></telerik:RadGrid><%--Datasources--%><asp:SqlDataSource ID="dsGetChargeForms" runat="server" ConnectionString="<%$ ConnectionStrings:OutpatientChargesConnectionString %>" SelectCommand="pSDGenie_OutpatientCharges_Get_ChargeForms" SelectCommandType="StoredProcedure"> <SelectParameters> <asp:ControlParameter ControlID="ddlEditClinic" DefaultValue="" Name="Clinic" PropertyName="SelectedValue" Type="String" /> <asp:ControlParameter ControlID="ddlEditCategory" DefaultValue="" Name="Category" PropertyName="SelectedValue" Type="String" /> </SelectParameters></asp:SqlDataSource>Private Sub rgvEdit_ItemCommand(sender As Object, e As GridCommandEventArgs) Handles rgvEdit.ItemCommand Select Case e.CommandName Case "PerformInsert" Dim MyUserControl As UserControl = CType(e.Item.FindControl(GridEditFormItem.EditFormUserControlID), UserControl) If MyUserControl IsNot Nothing Then 'Insert Dim chgId As Integer 'ToDo: get charge id Dim subcategory As String = TryCast(MyUserControl.FindControl("ddlSubcategories"), DropDownList).SelectedValue Dim procedureCode As String = TryCast(MyUserControl.FindControl("txtProcedureCode"), TextBox).Text Dim displayCode As String = TryCast(MyUserControl.FindControl("txtDisplayCode"), TextBox).Text Dim description As String = TryCast(MyUserControl.FindControl("txtDescription"), TextBox).Text Dim minutes As String = TryCast(MyUserControl.FindControl("txtMinutes"), TextBox).Text Dim blnModifier As Boolean = TryCast(MyUserControl.FindControl("cbxRequiresModifier"), CheckBox).Checked Dim blnEpsdt As Boolean = TryCast(MyUserControl.FindControl("cbxRequiresEPSDT"), CheckBox).Checked Dim blnContMgmt As Boolean = TryCast(MyUserControl.FindControl("cbxRequiresContraceptiveMgmt"), CheckBox).Checked Dim blnNoMd As Boolean = TryCast(MyUserControl.FindControl("cbxNoMdCharge"), CheckBox).Checked Dim userMeditechId As String = process.UserInfo_SDGenieMeditechID If IsNumeric(minutes) = False Then minutes = "0" End If If OCTools.AddChargeFormDefaultValue(Me.ddlEditClinic.SelectedValue, Me.ddlEditCategory.SelectedValue, subcategory, procedureCode, displayCode, description, minutes, blnModifier, blnEpsdt, blnContMgmt, blnNoMd) = True Then Log("Inserted New Charge Info", String.Format("{0} inserted new charge info with ID {1}", process.UserInfo_SDGenieUserName, chgId)) Me.UpdateUser("Insert") Else Me.UpdateUser("Error") End If End If Case "Update" Dim MyUserControl As UserControl = CType(e.Item.FindControl(GridEditFormItem.EditFormUserControlID), UserControl) If MyUserControl IsNot Nothing Then Dim id As String = TryCast(MyUserControl.FindControl("lblID"), Label).Text Dim subcategory As String = TryCast(MyUserControl.FindControl("ddlSubcategories"), DropDownList).SelectedValue Dim procedureCode As String = TryCast(MyUserControl.FindControl("txtProcedureCode"), TextBox).Text Dim displayCode As String = TryCast(MyUserControl.FindControl("txtDisplayCode"), TextBox).Text Dim description As String = TryCast(MyUserControl.FindControl("txtDescription"), TextBox).Text Dim minutes As String = TryCast(MyUserControl.FindControl("txtMinutes"), TextBox).Text Dim blnModifier As Boolean = TryCast(MyUserControl.FindControl("cbxRequiresModifier"), CheckBox).Checked Dim blnEpsdt As Boolean = TryCast(MyUserControl.FindControl("cbxRequiresEPSDT"), CheckBox).Checked Dim blnContMgmt As Boolean = TryCast(MyUserControl.FindControl("cbxRequiresContraceptiveMgmt"), CheckBox).Checked Dim blnNoMd As Boolean = TryCast(MyUserControl.FindControl("cbxNoMdCharge"), CheckBox).Checked Dim userMeditechId As String = process.UserInfo_SDGenieMeditechID If OCTools.UpdChargeFormDefaultValue(CInt(id), subcategory, procedureCode, displayCode, description, minutes, blnModifier, blnEpsdt, blnContMgmt, blnNoMd) = True Then Log("Updated Charge Info", String.Format("{0} updated charge info with ID {1}", process.UserInfo_SDGenieUserName, id)) Me.UpdateUser("Update") Else Me.UpdateUser("Error") End If End If Case "Delete" Dim id As Integer = 0 Try id = DirectCast((DirectCast(e.Item, GridDataItem)).GetDataKeyValue("id"), Integer) Catch ex As Exception End Try If id > 0 Then If OCTools.DelChargeFormDefaultValue(id) = True Then Log("Deleted Charge Info", String.Format("{0} deleted charge info with ID {1}", process.UserInfo_SDGenieUserName, id)) Me.UpdateUser("Delete") Else Me.UpdateUser("Error") End If End If Case Else 'Do Nothing End SelectEnd Sub