or
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
//Do not display SelectedFilesCount progress indicator.
RadProgressArea1.ProgressIndicators &= ~ProgressIndicators.SelectedFilesCount;
}
RadProgressArea1.Localization.Uploaded = "Total Progress";
RadProgressArea1.Localization.UploadedFiles = "Progress";
RadProgressArea1.Localization.CurrentFileName = "Please wait while updating database... ";
}
private void UpdateProgressContext()
{
RadProgressContext progress = RadProgressContext.Current;
const int total = 100;
progress.Speed = "N/A";
for (int i = 0; i < total; i++)
{
progress.PrimaryTotal = 1;
progress.PrimaryValue = 1;
progress.PrimaryPercent = 100;
progress.SecondaryTotal = total;
progress.SecondaryValue = i;
progress.SecondaryPercent = i;
progress.CurrentOperationText = "Step " + i.ToString();
if (!Response.IsClientConnected)
{
//Cancel button was clicked or the browser was closed, so stop processing
break;
}
progress.TimeEstimated = (total - i) * 100;
//Stall the current thread for 0.1 seconds
System.Threading.Thread.Sleep(50);
}
}
protected void RadButton1_Click(object sender, EventArgs e)
{
UpdateProgressContext(); //I assume this is how it call
RetrieveData();
}
 
@(Html.Telerik().
Grid(Model).
Name(
"Grid"
).
Columns(
Sub
(columns)
columns.Bound(
Function
(o) o.DocumentId).Width(20)
columns.Bound(
Function
(o) o.StatusCode).Width(20).Title(
"Status"
)
columns.Bound(
Function
(o) o.LastName).Width(10).Title(
"LastName"
)
columns.Template(
Function
(o) Html.ActionLink(
"View"
,
"View"
,
New
With
{.id = o.Id}))
End
Sub
).
Pageable.
Sortable)
)
 
<%@ Page Title="" Language="VB" MasterPageFile="~/Resources/MasterPages/Clients.master" AutoEventWireup="false" CodeFile="CreateProject.aspx.vb" Inherits="Web_Clients_CreateProject" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<
asp:Content
ID
=
"Content1"
ContentPlaceHolderID
=
"head"
Runat
=
"Server"
>
<
style
type
=
"text/css"
>
.style1
{
width: 100%;
}
.style3
{
width: 250px;
}
.style4
{
border: 1px solid #abc1de;
padding: 1px 4px;
width: 100%;
}
.style7
{
width: 180px;
}
.style8
{
width: 96px;
}
.style9
{
width: 195px;
}
.style10
{
width: 140px;
}
.style11
{
width: 127px;
}
</
style
>
</
asp:Content
>
<
asp:Content
ID
=
"Content2"
ContentPlaceHolderID
=
"cphHeaderText"
Runat
=
"Server"
>
Create Project
</
asp:Content
>
<
asp:Content
ID
=
"Content3"
ContentPlaceHolderID
=
"cphMain"
Runat
=
"Server"
>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"chkPONA"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"txtRadPO"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
<
telerik:AjaxSetting
AjaxControlID
=
"lstRadSouceLangLista"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"lstRadSouceLangSelected"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
<
telerik:AjaxSetting
AjaxControlID
=
"lstRadSouceLangSelected"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"lstRadSouceLangLista"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
<
telerik:AjaxSetting
AjaxControlID
=
"cmbRadTTools"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"cmbRadTTools"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"div_OtherTTool"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
<
telerik:AjaxSetting
AjaxControlID
=
"chkTranslateOther"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"txtRadTranslateOther"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
<
telerik:AjaxSetting
AjaxControlID
=
"chkDeliveryOther"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"txtRadDeliveryOther"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
div
id
=
"divProjectName"
class
=
"TableTextoMedio"
style
=
"float:left "
>
<
table
class
=
"style1"
>
<
tr
>
<
td
class
=
"style9"
>
Project Name:<
div
id
=
"prueba"
></
div
></
td
>
<
td
>
<
telerik:RadTextBox
ID
=
"txtRadProjectName"
Runat
=
"server"
EmptyMessage
=
"Project Name"
LabelWidth
=
""
Width
=
"560px"
>
<
EmptyMessageStyle
Font-Italic
=
"False"
/>
</
telerik:RadTextBox
>
</
td
>
</
tr
>
<
tr
>
<
td
class
=
"style9"
>
Targeted Market and Audience:</
td
>
<
td
>
<
telerik:RadTextBox
ID
=
"txtRadAudience"
Runat
=
"server"
EmptyMessage
=
"Targeted Audience"
LabelWidth
=
""
Width
=
"560px"
>
<
EmptyMessageStyle
Font-Italic
=
"False"
/>
</
telerik:RadTextBox
>
</
td
>
</
tr
>
</
table
>
</
div
>
<
div
id
=
"div_menu"
style
=
"float:right"
>
<
div
>
<
telerik:RadMenu
ID
=
"RadMenu1"
runat
=
"server"
EnableRoundedCorners
=
"True"
EnableShadows
=
"True"
>
<
Items
>
<
telerik:RadMenuItem
runat
=
"server"
Text
=
"Profile"
>
<
Items
>
<
telerik:RadMenuItem
runat
=
"server"
Text
=
"Save current selections as default"
Font-Size
=
"12px"
>
</
telerik:RadMenuItem
>
<
telerik:RadMenuItem
runat
=
"server"
Text
=
"Load default selections"
Font-Size
=
"12px"
>
</
telerik:RadMenuItem
>
<
telerik:RadMenuItem
runat
=
"server"
IsSeparator
=
"True"
Text
=
"Child RadMenuItem 3"
Font-Size
=
"12px"
>
</
telerik:RadMenuItem
>
<
telerik:RadMenuItem
runat
=
"server"
Text
=
"Load default selections automatically"
PostBack
=
"false"
Font-Size
=
"12px"
>
<
ItemTemplate
>
<
asp:CheckBox
ID
=
"CheckBox3"
runat
=
"server"
Text
=
" Always load default selections"
Font-Size
=
"11px"
/>
</
ItemTemplate
>
</
telerik:RadMenuItem
>
</
Items
>
</
telerik:RadMenuItem
>
</
Items
>
</
telerik:RadMenu
>
</
div
>
<
div
>
<
telerik:RadAjaxPanel
ID
=
"RadAjaxPanel1"
runat
=
"server"
Height
=
"64px"
Width
=
"80px"
>
<
asp:Image
ID
=
"imgStatusCrearProyecto"
ImageUrl
=
"~/Resources/Icons/cross-icon.jpg"
runat
=
"server"
Height
=
"64px"
Width
=
"80px"
/>
<
asp:Timer
ID
=
"Timer1"
runat
=
"server"
Interval
=
"1000"
>
</
asp:Timer
>
</
telerik:RadAjaxPanel
>
</
div
>
</
div
>
<
div
style
=
"clear:left;"
>
</
div
>
<
div
id
=
"divData1"
class
=
"TableTextoMedio"
style
=
"float:left; padding-top:20px;"
>
<
table
class
=
"style1"
>
<
tr
>
<
td
class
=
"style10"
>
Account:</
td
>
<
td
>
<
telerik:RadTextBox
ID
=
"txtRadAccount"
Runat
=
"server"
EmptyMessage
=
"Account"
LabelWidth
=
""
Width
=
"160px"
>
<
EmptyMessageStyle
Font-Italic
=
"False"
/>
</
telerik:RadTextBox
>
</
td
>
</
tr
>
<
tr
>
<
td
class
=
"style10"
>
Desired Delivery Date:</
td
>
<
td
>
<
telerik:RadDateTimePicker
ID
=
"RadDateTimePicker1"
Runat
=
"server"
Culture
=
"es-ES"
>
<
TimeView
CellSpacing
=
"-1"
Culture
=
"es-ES"
></
TimeView
>
<
TimePopupButton
ImageUrl
=
""
HoverImageUrl
=
""
></
TimePopupButton
>
<
Calendar
UseRowHeadersAsSelectors
=
"False"
UseColumnHeadersAsSelectors
=
"False"
ViewSelectorText
=
"x"
ShowRowHeaders
=
"False"
>
<
SpecialDays
>
<
telerik:RadCalendarDay
Repeatable
=
"Today"
Date
=
""
ItemStyle-CssClass
=
"rcToday"
/>
</
SpecialDays
>
</
Calendar
>
<
DateInput
DisplayDateFormat
=
"dd/MM/yyyy"
DateFormat
=
"dd/MM/yyyy"
LabelWidth
=
""
EmptyMessage
=
"Delivery Date"
>
</
DateInput
>
<
DatePopupButton
ImageUrl
=
""
HoverImageUrl
=
""
></
DatePopupButton
>
</
telerik:RadDateTimePicker
>
</
td
>
</
tr
>
<
tr
>
<
td
class
=
"style10"
>
Time Zone:</
td
>
<
td
>
<
telerik:RadComboBox
ID
=
"cmbRadTimeZone"
Runat
=
"server"
DataSourceID
=
"XmlDataSourceTimeZones"
DataTextField
=
"Text"
DataValueField
=
"value"
Width
=
"200px"
DropDownWidth
=
"500px"
HighlightTemplatedItems
=
"True"
>
<
ItemTemplate
>
<
div
class
=
"combo-item-template"
style
=
"font-size:11px"
>
<%# Eval("Text") %>
</
div
>
</
ItemTemplate
>
</
telerik:RadComboBox
>
<
asp:XmlDataSource
ID
=
"XmlDataSourceTimeZones"
runat
=
"server"
DataFile
=
"~/App_Data/TimeZones.xml"
></
asp:XmlDataSource
>
</
td
>
</
tr
>
</
table
>
</
div
>
<
div
id
=
"divData2"
class
=
"TableTextoMedio"
style
=
"float: left; padding-left:50px; padding-top:20px;"
>
<
table
class
=
"style1"
>
<
tr
>
<
td
class
=
"style11"
>
Purchase Order:</
td
>
<
td
>
<
telerik:RadTextBox
ID
=
"txtRadPO"
Runat
=
"server"
EmptyMessage
=
"Purchase Order"
LabelWidth
=
""
Width
=
"160px"
>
<
EmptyMessageStyle
Font-Italic
=
"False"
/>
</
telerik:RadTextBox
>
</
td
>
</
tr
>
<
tr
>
<
td
class
=
"style11"
>
Client Project Code:</
td
>
<
td
>
<
telerik:RadTextBox
ID
=
"txtRadClientCode"
Runat
=
"server"
EmptyMessage
=
"Client Project Code"
LabelWidth
=
""
Width
=
"160px"
>
<
EmptyMessageStyle
Font-Italic
=
"False"
/>
</
telerik:RadTextBox
>
</
td
>
</
tr
>
</
table
>
</
div
>
<
div
id
=
"div1"
class
=
"TableTextoMedio"
style
=
"float: left; padding-left:10px; padding-top:20px;"
>
<
asp:CheckBox
ID
=
"chkPONA"
runat
=
"server"
Text
=
" Tick if PO is not applicable"
AutoPostBack
=
"True"
/>
</
div
>
<
div
style
=
"clear:both"
>
</
div
>
<
br
/>
<
div
id
=
"divSourceLanguage"
class
=
"TableTextoMedio"
style
=
"float:left;"
>
<
table
class
=
"style1"
>
<
tr
>
<
td
class
=
"style3"
>
<
b
>Source Language:</
b
></
td
>
<
td
>
</
td
>
</
tr
>
<
tr
>
<
td
>
<
telerik:RadListBox
ID
=
"lstRadSouceLangLista"
runat
=
"server"
Height
=
"110px"
Width
=
"250px"
AllowTransfer
=
"True"
TransferToID
=
"lstRadSouceLangSelected"
AutoPostBackOnTransfer
=
"True"
EnableMarkMatches
=
"True"
AllowTransferOnDoubleClick
=
"True"
DataKeyField
=
"Variante"
DataSortField
=
"Nombre"
DataTextField
=
"Nombre"
DataValueField
=
"Variante"
Sort
=
"Ascending"
>
<
ButtonSettings
TransferButtons
=
"Common"
ShowDelete
=
"False"
ShowTransferAll
=
"False"
></
ButtonSettings
>
</
telerik:RadListBox
> </
td
>
<
td
>
<
telerik:RadListBox
ID
=
"lstRadSouceLangSelected"
runat
=
"server"
Height
=
"110px"
Width
=
"220px"
EnableMarkMatches
=
"True"
Font-Bold
=
"True"
AllowTransferOnDoubleClick
=
"True"
>
</
telerik:RadListBox
> </
td
>
</
tr
>
</
table
>
</
div
>
<
div
id
=
"divTargetLanguages"
class
=
"TableTextoMedio"
style
=
"float:left; padding-left:50px;"
>
<
table
class
=
"style1"
>
<
tr
>
<
td
class
=
"style3"
>
<
b
>Target Languages:</
b
></
td
>
<
td
>
</
td
>
</
tr
>
<
tr
>
<
td
>
<
telerik:RadListBox
ID
=
"lstRadTargetLangLista"
runat
=
"server"
Height
=
"110px"
Width
=
"250px"
AllowTransfer
=
"True"
AllowTransferOnDoubleClick
=
"True"
SelectionMode
=
"Multiple"
TransferToID
=
"lstRadTargetLangSelected"
EnableMarkMatches
=
"True"
DataKeyField
=
"Variante"
DataSortField
=
"Nombre"
DataTextField
=
"Nombre"
DataValueField
=
"Variante"
>
</
telerik:RadListBox
>
</
td
>
<
td
>
<
telerik:RadListBox
ID
=
"lstRadTargetLangSelected"
runat
=
"server"
Height
=
"110px"
Width
=
"220px"
EnableMarkMatches
=
"True"
Font-Bold
=
"True"
ForeColor
=
"Red"
AllowTransferOnDoubleClick
=
"True"
>
</
telerik:RadListBox
>
</
td
>
</
tr
>
</
table
>
</
div
>
<
div
style
=
"clear:both"
>
</
div
>
<
br
/>
<
br
/>
<
div
id
=
"divTasks"
class
=
"TableTextoMedio"
style
=
"float:left;"
>
<
table
class
=
"style1"
>
<
tr
>
<
td
class
=
"style3"
>
<
b
>Tasks to be performed:</
b
></
td
>
<
td
>
</
td
>
</
tr
>
<
tr
>
<
td
>
<
telerik:RadListBox
ID
=
"lstRadTasksList"
runat
=
"server"
Height
=
"110px"
Width
=
"250px"
AllowTransfer
=
"True"
AllowTransferOnDoubleClick
=
"True"
SelectionMode
=
"Multiple"
TransferToID
=
"lstRadTasksSelected"
EnableMarkMatches
=
"True"
DataKeyField
=
"idTarea"
DataSortField
=
"Orden"
DataTextField
=
"Descripcion"
DataValueField
=
"idTarea"
>
</
telerik:RadListBox
>
</
td
>
<
td
>
<
telerik:RadListBox
ID
=
"lstRadTasksSelected"
runat
=
"server"
Height
=
"110px"
Width
=
"220px"
EnableMarkMatches
=
"True"
Font-Bold
=
"True"
ForeColor
=
"Red"
AllowTransferOnDoubleClick
=
"True"
>
</
telerik:RadListBox
>
</
td
>
</
tr
>
</
table
>
<
br
/>
<
br
/>
<
div
id
=
"div_ttools"
style
=
"float:left;"
>
<
div
style
=
"padding-left:2px; padding-bottom:3px"
>
<
strong
>Translation tool:</
strong
>
</
div
>
<
table
class
=
"style4"
>
<
tr
>
<
td
class
=
"style8"
>
<
telerik:RadComboBox
ID
=
"cmbRadTTools"
runat
=
"server"
DataSourceID
=
"EntityDataSourceTools"
DataTextField
=
"Nombre"
DataValueField
=
"idTTool"
EnableTextSelection
=
"False"
MarkFirstMatch
=
"True"
Sort
=
"Ascending"
Width
=
"200px"
AutoPostBack
=
"True"
CheckBoxes
=
"True"
DropDownWidth
=
"230px"
>
</
telerik:RadComboBox
>
</
td
>
</
tr
>
<
tr
>
<
td
class
=
"style8"
>
</
td
>
</
tr
>
<
tr
>
<
td
class
=
"style8"
>
<
div
id
=
"div_OtherTTool"
runat
=
"server"
style
=
"visibility:hidden"
>
<
telerik:RadTextBox
ID
=
"txtRadOtherTTool"
Runat
=
"server"
EmptyMessage
=
"Please indicate"
LabelWidth
=
""
Width
=
"190px"
>
<
EmptyMessageStyle
Font-Italic
=
"True"
/>
</
telerik:RadTextBox
>
</
div
>
</
td
>
</
tr
>
</
table
>
</
div
>
<
div
id
=
"div_hiddentext"
style
=
"float:left; padding-left:40px"
>
<
div
style
=
"padding-left:2px; padding-bottom:3px"
>
<
strong
>Is there hidden text?</
strong
>
</
div
>
<
table
class
=
"style4"
>
<
tr
>
<
td
class
=
"style8"
>
<
asp:RadioButton
ID
=
"radioHiddenTextYes"
runat
=
"server"
Checked
=
"True"
GroupName
=
"grpHiddenText"
Text
=
" Yes"
/>
</
td
>
<
td
>
</
td
>
</
tr
>
<
tr
>
<
td
class
=
"style8"
>
<
asp:RadioButton
ID
=
"radioHiddenTextNo"
runat
=
"server"
GroupName
=
"grpHiddenText"
Text
=
" No"
Checked
=
"True"
/>
</
td
>
<
td
>
</
td
>
</
tr
>
<
tr
>
<
td
class
=
"style8"
>
<
asp:RadioButton
ID
=
"radioHiddenTextDontKnow"
runat
=
"server"
GroupName
=
"grpHiddenText"
Text
=
" Don't know"
/>
</
td
>
<
td
>
</
td
>
</
tr
>
</
table
>
</
div
>
</
div
>
<
div
id
=
"divTranslate"
class
=
"TableTextoMedio"
style
=
"float:left; padding-left:50px;"
>
<
div
style
=
"padding-left:2px; padding-bottom:3px"
>
<
strong
>Translate:</
strong
>
</
div
>
<
table
class
=
"style4"
>
<
tr
>
<
td
>
<
table
>
<
tr
>
<
td
class
=
"style7"
>
<
asp:RadioButton
ID
=
"radioTranslateAll"
runat
=
"server"
Checked
=
"True"
GroupName
=
"grpTranslate"
Text
=
"All"
AutoPostBack
=
"True"
/>
</
td
>
</
tr
>
<
tr
>
<
td
class
=
"style7"
>
<
asp:RadioButton
ID
=
"radioTranslateSelect"
runat
=
"server"
GroupName
=
"grpTranslate"
Text
=
"Select"
AutoPostBack
=
"True"
/>
</
td
>
</
tr
>
</
table
>
<
table
style
=
"padding-left:15px"
>
<
tr
>
<
td
class
=
"style7"
>
<
asp:CheckBox
ID
=
"chkTranslateText"
runat
=
"server"
Text
=
" Text"
Enabled
=
"False"
/>
</
td
>
</
tr
>
<
tr
>
<
td
class
=
"style7"
>
<
asp:CheckBox
ID
=
"chkTranslateTextBoxes"
runat
=
"server"
Text
=
" Text boxes"
Enabled
=
"False"
/>
</
td
>
</
tr
>
<
tr
>
<
td
class
=
"style7"
>
<
asp:CheckBox
ID
=
"chkTranslateImages"
runat
=
"server"
Text
=
" Images"
Enabled
=
"False"
/>
</
td
>
</
tr
>
<
tr
>
<
td
class
=
"style7"
style
=
"vertical-align:top"
;>
<
asp:CheckBox
ID
=
"chkTranslateOther"
runat
=
"server"
Text
=
" Other:"
AutoPostBack
=
"True"
Enabled
=
"False"
/>
</
td
>
</
tr
>
<
tr
>
<
td
class
=
"style7"
style
=
"vertical-align:top"
;>
<
telerik:RadTextBox
ID
=
"txtRadTranslateOther"
Runat
=
"server"
EmptyMessage
=
"Elements to be translated"
LabelWidth
=
""
TextMode
=
"MultiLine"
Width
=
"100%"
Rows
=
"8"
Enabled
=
"False"
>
<
emptymessagestyle
font-italic
=
"False"
/>
</
telerik:RadTextBox
>
</
td
>
</
tr
>
</
table
>
</
td
>
</
tr
>
</
table
>
</
div
>
<
div
id
=
"divFormats"
class
=
"TableTextoMedio"
style
=
"float:left; padding-left:60px;"
>
<
div
style
=
"padding-left:2px; padding-bottom:3px"
>
<
strong
>Delivery format:</
strong
>
</
div
>
<
table
class
=
"style4"
>
<
tr
>
<
td
class
=
"style7"
>
<
asp:CheckBox
ID
=
"chkDeliverySource"
runat
=
"server"
Text
=
" Source format"
Checked
=
"True"
/>
</
td
>
</
tr
>
<
tr
>
<
td
class
=
"style7"
style
=
"vertical-align:top"
;>
<
asp:CheckBox
ID
=
"chkDeliveryOther"
runat
=
"server"
Text
=
" Other:"
AutoPostBack
=
"True"
/>
</
td
>
</
tr
>
<
tr
>
<
td
class
=
"style7"
style
=
"vertical-align:top"
;>
<
telerik:RadTextBox
ID
=
"txtRadDeliveryOther"
Runat
=
"server"
EmptyMessage
=
"Describe the formats you desire"
LabelWidth
=
""
TextMode
=
"MultiLine"
Width
=
"100%"
Rows
=
"8"
Enabled
=
"False"
>
<
emptymessagestyle
font-italic
=
"False"
/>
</
telerik:RadTextBox
>
</
td
>
</
tr
>
</
table
>
</
div
>
<
div
style
=
"clear:both"
>
</
div
>
<
br
/>
<
div
id
=
"divInstructions"
class
=
"TableTextoMedio"
>
<
div
style
=
"padding-left:2px; padding-bottom:3px"
>
<
strong
>Translation Instructions:</
strong
>
</
div
>
<
table
class
=
"style1"
>
<
tr
>
<
td
>
<
telerik:RadTextBox
ID
=
"RadTextBox1"
Runat
=
"server"
EmptyMessage
=
"Type translation instructions"
LabelWidth
=
""
TextMode
=
"MultiLine"
Width
=
"740px"
Rows
=
"10"
>
<
emptymessagestyle
font-italic
=
"True"
/>
</
telerik:RadTextBox
>
</
td
>
</
tr
>
</
table
>
</
div
>
<
br
/>
<
br
/>
<
div
class
=
"TableTextoPeque"
>
<
asp:Button
ID
=
"Button1"
runat
=
"server"
Text
=
"Create project"
/>
</
div
>
<
telerik:RadToolTipManager
ID
=
"RadToolTipManager1"
runat
=
"server"
HideEvent
=
"LeaveTargetAndToolTip"
RenderInPageRoot
=
"True"
OnAjaxUpdate
=
"OnAjaxUpdate"
AutoCloseDelay
=
"0"
EnableShadow
=
"True"
Position
=
"BottomLeft"
RelativeTo
=
"Mouse"
Width
=
"400px"
ShowDelay
=
"0"
>
<
TargetControls
>
<
telerik:ToolTipTargetControl
TargetControlID
=
"imgStatusCrearProyecto"
IsClientID
=
"false"
/>
</
TargetControls
>
</
telerik:RadToolTipManager
>
<
telerik:RadSkinManager
ID
=
"RadSkinManager1"
Runat
=
"server"
Skin
=
"Office2007"
>
</
telerik:RadSkinManager
>
<
asp:EntityDataSource
ID
=
"EntityDataSourceTools"
runat
=
"server"
ConnectionString
=
"name=Extranet_JSProjects_Entities"
DefaultContainerName
=
"Extranet_JSProjects_Entities"
EnableFlattening
=
"False"
EntitySetName
=
"js_TranslationTools"
Select
=
"it.[idTTool], it.[Nombre]"
>
</
asp:EntityDataSource
>
</
asp:Content
>
CreateProject.aspx.vb
Imports
Telerik.Web.UI
Imports
System.Data
Imports
Extranet_JSProjects_Model
Partial
Class
Web_Clients_CreateProject
Inherits
System.Web.UI.Page
Public
Class
ErroresAlCrearProyecto
Private
_Campo
As
String
Public
Property
Campo
As
String
Get
Return
_Campo
End
Get
Set
(value
As
String
)
_Campo = value
End
Set
End
Property
Private
_DescripcionError
As
String
Public
Property
DescripcionError
As
String
Get
Return
_DescripcionError
End
Get
Set
(value
As
String
)
_DescripcionError = value
End
Set
End
Property
End
Class
Protected
Sub
Page_Load(sender
As
Object
, e
As
System.EventArgs)
Handles
Me
.Load
If
Not
IsPostBack
Then
CargarIdiomas(lstRadSouceLangLista)
CargarIdiomas(lstRadTargetLangLista)
lstRadSouceLangLista.ButtonSettings.TransferButtons = ListBoxTransferButtons.TransferFrom
lstRadSouceLangLista.Sort = RadListBoxSort.Ascending
lstRadSouceLangLista.SortItems()
lstRadTargetLangLista.Sort = RadListBoxSort.Ascending
lstRadTargetLangLista.SortItems()
CargarTareas(lstRadTasksList)
div_OtherTTool.Attributes(
"style"
) =
"visibility:hidden"
RadDateTimePicker1.MinDate = Now
'RadToolTipManager1.TargetControls.Add(imgStatusCrearProyecto.ClientID, True)
txtRadProjectName.Focus()
End
If
End
Sub
Protected
Sub
CargarIdiomas(lista
As
RadListBox)
Using myProjectsEntities
As
New
Extranet_JSProjects_Entities
Dim
query = From v
In
myProjectsEntities.js_IdiomasVariantes Join i
In
myProjectsEntities.js_Idiomas
On
v.IdiomaPadre Equals i.IdiomaId
Select
New
With
{.Nombre = i.Nombre, .Variante = v.Nombre, .IdiomaId = i.IdiomaId, .IdiomaVarianteId = v.IdiomaVarianteId}
For
Each
v
In
query
Dim
texto
As
String
Dim
valor
As
Integer
texto = v.Nombre &
" - "
& v.Variante
valor = v.IdiomaVarianteId
Dim
elemento
As
New
RadListBoxItem
elemento.Text = texto
elemento.Value = valor
lista.Items.Add(elemento)
Next
End
Using
End
Sub
Protected
Sub
CargarTareas(lista
As
RadListBox)
Using myProjectsEntities
As
New
Extranet_JSProjects_Entities
Dim
query = From t
In
myProjectsEntities.js_TareasTraduccion
Order By t.Orden
Select
t
For
Each
t
In
query
Dim
texto
As
String
Dim
valor
As
Integer
texto = t.Descripcion
valor = t.idTarea
Dim
elemento
As
New
RadListBoxItem
elemento.Text = texto
elemento.Value = valor
lista.Items.Add(elemento)
Next
End
Using
End
Sub
Protected
Sub
Timer1_Tick(sender
As
Object
, e
As
System.EventArgs)
Handles
Timer1.Tick
Dim
NumeroDeErrores
As
Integer
= 0
'Nombre del proyecto
If
txtRadProjectName.Text.Length = 0
Then
NumeroDeErrores = NumeroDeErrores + 1
End
If
'Purchase Order
If
txtRadPO.Text.Length = 0
And
chkPONA.Checked =
False
Then
NumeroDeErrores = NumeroDeErrores + 1
End
If
If
NumeroDeErrores = 0
Then
'RadToolTipManager1.TargetControls.Clear()
imgStatusCrearProyecto.ImageUrl =
"~/Resources/Icons/check-icon.jpg"
Else
'RadToolTipManager1.TargetControls.Add(imgStatusCrearProyecto.ClientID, True)
imgStatusCrearProyecto.ImageUrl =
"~/Resources/Icons/cross-icon.jpg"
End
If
End
Sub
Private
Sub
AgregarError(Campo
As
String
, Descripcion
As
String
, ListaDeErrores
As
List(Of ErroresAlCrearProyecto))
Dim
ErrorEnCurso
As
New
ErroresAlCrearProyecto
ErrorEnCurso.Campo = Campo
ErrorEnCurso.DescripcionError = Descripcion
ListaDeErrores.Add(ErrorEnCurso)
End
Sub
Protected
Sub
OnAjaxUpdate(sender
As
Object
, e
As
ToolTipUpdateEventArgs)
Dim
ListaDeErrores
As
New
List(Of ErroresAlCrearProyecto)
Using myEntities
As
New
Extranet_JSProjects_Entities
'Eliminar todos los registros que haya en la tabla
Dim
query = From r
In
myEntities.js_ErroresCrearProyecto
Select
r
For
Each
r
In
query
myEntities.js_ErroresCrearProyecto.DeleteObject(r)
Next
'Añadir el error a la tabla js_ErroresCrearProyecto
'Nombre del proyecto
If
txtRadProjectName.Text.Length = 0
Then
AgregarError(
"Project Name"
,
"Enter a project name"
, ListaDeErrores)
End
If
'Purchase Order
If
txtRadPO.Text.Length = 0
And
chkPONA.Checked =
False
Then
AgregarError(
"Purchase Order"
,
"Enter a PO or tick the checkbox"
, ListaDeErrores)
End
If
For
Each
r
In
ListaDeErrores
Dim
NuevoError
As
New
js_ErroresCrearProyecto
NuevoError.Campo = r.Campo
NuevoError.Descripcion = r.DescripcionError
myEntities.AddTojs_ErroresCrearProyecto(NuevoError)
Next
myEntities.SaveChanges()
End
Using
Dim
panel
As
New
UpdatePanel
panel = e.UpdatePanel
Dim
ctrl
As
Control = Page.LoadControl(
"CreateProjectErrors.ascx"
)
panel.ContentTemplateContainer.Controls.Add(ctrl)
End
Sub
Protected
Sub
Button1_Click(sender
As
Object
, e
As
System.EventArgs)
Handles
Button1.Click
Response.Redirect(
"UploadFiles.aspx"
)
End
Sub
Protected
Sub
RadListBox2_Deleted(sender
As
Object
, e
As
Telerik.Web.UI.RadListBoxEventArgs)
Handles
lstRadSouceLangSelected.Deleted
lstRadSouceLangLista.ButtonSettings.TransferButtons = ListBoxTransferButtons.TransferFrom
lstRadSouceLangLista.AllowTransferOnDoubleClick =
True
lstRadSouceLangSelected.AllowTransferOnDoubleClick =
False
End
Sub
Protected
Sub
RadListBox2_Inserted(sender
As
Object
, e
As
Telerik.Web.UI.RadListBoxEventArgs)
Handles
lstRadSouceLangSelected.Inserted
lstRadSouceLangLista.ButtonSettings.TransferButtons = ListBoxTransferButtons.TransferTo
lstRadSouceLangLista.AllowTransferOnDoubleClick =
False
lstRadSouceLangSelected.AllowTransferOnDoubleClick =
True
End
Sub
Protected
Sub
RadComboBoxTTools_DataBound(sender
As
Object
, e
As
System.EventArgs)
Handles
cmbRadTTools.DataBound
cmbRadTTools.SortItems()
'Seleccionar por omisión la opción "No choice"
For
Each
elemento
As
RadComboBoxItem
In
cmbRadTTools.Items
If
elemento.Text = AppConfiguration._String_NoChoice
Then
elemento.Selected =
True
elemento.Checked =
True
End
If
Next
End
Sub
Protected
Sub
cmbRadTTools_ItemChecked(sender
As
Object
, e
As
Telerik.Web.UI.RadComboBoxItemEventArgs)
Handles
cmbRadTTools.ItemChecked
'Si se selecciona "No Choice" se deseleccionan todos los demás
'Se se selecciona cualquier otro se deselecciona "No Choice"
If
e.Item.Text = AppConfiguration._String_NoChoice
Then
For
Each
elemento
As
RadComboBoxItem
In
cmbRadTTools.Items
If
elemento.Text <> AppConfiguration._String_NoChoice
Then
elemento.Checked =
False
End
If
Next
Else
For
Each
elemento
As
RadComboBoxItem
In
cmbRadTTools.Items
If
elemento.Text = AppConfiguration._String_NoChoice
Then
elemento.Checked =
False
End
If
Next
End
If
If
e.Item.Text = AppConfiguration._String_Other
And
e.Item.Checked =
True
Then
div_OtherTTool.Attributes(
"style"
) =
"visibility:visible"
End
If
If
e.Item.Text = AppConfiguration._String_Other
And
e.Item.Checked =
False
Then
div_OtherTTool.Attributes(
"style"
) =
"visibility:hidden"
End
If
e.Item.Selected =
True
'Si no hay ningún elemento seleccionado, seleccionar "No Choice"
If
cmbRadTTools.CheckedItems.Count = 0
Then
For
Each
elemento
As
RadComboBoxItem
In
cmbRadTTools.Items
If
elemento.Text = AppConfiguration._String_NoChoice
Then
elemento.Checked =
True
elemento.Selected =
True
End
If
Next
End
If
End
Sub
Protected
Sub
chkPONA_CheckedChanged(sender
As
Object
, e
As
System.EventArgs)
Handles
chkPONA.CheckedChanged
If
chkPONA.Checked =
True
Then
txtRadPO.Enabled =
False
Else
txtRadPO.Enabled =
True
End
If
End
Sub
Protected
Sub
cmbRadTimeZone_DataBound(sender
As
Object
, e
As
System.EventArgs)
Handles
cmbRadTimeZone.DataBound
'Seleccionar la zona horaria del usuario
For
Each
elemento
As
RadComboBoxItem
In
cmbRadTimeZone.Items
Dim
valor = Convert.ToDouble(elemento.Value)
If
valor = Profile.TimeZone
Then
elemento.Selected =
True
End
If
Next
End
Sub
Protected
Sub
radioTranslateSelect_CheckedChanged(sender
As
Object
, e
As
System.EventArgs)
Handles
radioTranslateSelect.CheckedChanged
chkTranslateImages.Enabled =
CType
(sender, RadioButton).Checked
chkTranslateText.Enabled =
CType
(sender, RadioButton).Checked
chkTranslateTextBoxes.Enabled =
CType
(sender, RadioButton).Checked
chkTranslateOther.Enabled =
CType
(sender, RadioButton).Checked
End
Sub
Protected
Sub
radioTranslateAll_CheckedChanged(sender
As
Object
, e
As
System.EventArgs)
Handles
radioTranslateAll.CheckedChanged
chkTranslateImages.Enabled =
Not
CType
(sender, RadioButton).Checked
chkTranslateText.Enabled =
Not
CType
(sender, RadioButton).Checked
chkTranslateTextBoxes.Enabled =
Not
CType
(sender, RadioButton).Checked
chkTranslateOther.Enabled =
Not
CType
(sender, RadioButton).Checked
End
Sub
Protected
Sub
chkTranslateOther_CheckedChanged(sender
As
Object
, e
As
System.EventArgs)
Handles
chkTranslateOther.CheckedChanged
txtRadTranslateOther.Enabled =
CType
(sender, CheckBox).Checked
End
Sub
Protected
Sub
chkDeliveryOther_CheckedChanged(sender
As
Object
, e
As
System.EventArgs)
Handles
chkDeliveryOther.CheckedChanged
txtRadDeliveryOther.Enabled =
CType
(sender, CheckBox).Checked
End
Sub
End
Class
CreateProjectErrors.ascx
<%@ Control Language="VB" AutoEventWireup="false" CodeFile="CreateProjectErrors.ascx.vb" Inherits="Web_Clients_WebUserControl" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<
table
width
=
"360px"
cellpadding
=
"1"
>
<
tr
>
<
td
style
=
"width:150px;"
>
<
strong
>Field</
strong
>
</
td
>
<
td
style
=
"width:200px;"
>
<
strong
>Error</
strong
>
</
td
>
</
tr
>
<
tr
>
<
td
>
</
td
>
<
td
>
</
td
>
</
tr
>
<
asp:Repeater
ID
=
"repeaterErroresCrearProyecto"
runat
=
"server"
>
<
ItemTemplate
>
<
tr
>
<
td
>
<%# Eval("Campo")%>
</
td
>
<
td
>
<%# Eval("Descripcion")%>
</
td
>
</
tr
>
</
ItemTemplate
>
</
asp:Repeater
>
</
table
>
<
asp:EntityDataSource
ID
=
"EntityDataSource1"
runat
=
"server"
ConnectionString
=
"name=Extranet_JSProjects_Entities"
DefaultContainerName
=
"Extranet_JSProjects_Entities"
EnableFlattening
=
"False"
EntitySetName
=
"js_ErroresCrearProyecto"
Select
=
"it.[Campo], it.[Descripcion]"
>
</
asp:EntityDataSource
>
CreateProject.ascx.vb
Partial
Class
Web_Clients_WebUserControl
Inherits
System.Web.UI.UserControl
Protected
Sub
Page_Load(sender
As
Object
, e
As
System.EventArgs)
Handles
Me
.Load
repeaterErroresCrearProyecto.DataSource = EntityDataSource1
repeaterErroresCrearProyecto.DataBind()
End
Sub
End
Class
function
addSelectedCategoriesToArray(categoryNamesArray) {
var
$ = $telerik.$;
var
categoryPanelBar = $find(
'<%=RadPanelBar1.ClientID %>'
);
$(
':checkbox:checked'
, categoryPanelBar.get_element()).each(
function
() {
categoryNames.push($(
this
).attr(
'name'
));
});
}
<
script
type
=
"text/javascript"
>
function OnClientAppointmentMoving(sender, eventArgs) {
eventArgs.set_cancel(true);
}
function pageLoad() {
setTimeout(function () {
$("div.RadScheduler ").center();
}, 100);
}
jQuery.fn.center = function () {
this.css("height", $(window).height() + "px");
return this;
}
</
script
>