protected void aplToolBar_ButtonClick(object sender, Telerik.Web.UI.RadToolBarEventArgs e) { if (e.Item.Value == "Edit") { SetControlReadOnly(false); } }
protected void tblButtons_ButtonClick(object sender, Telerik.Web.UI.RadToolBarEventArgs e) { try { if (string.IsNullOrEmpty(PerformerIDComboBox.SelectedValue)) { throw new UserException("ابتدا شخصي را كه به او ارجاع ميشود را انتخاب كنيد."); } if (this.CurrentUserCode.ToString() == PerformerIDComboBox.SelectedValue) { throw new UserException("شما نمي توانيد يك كار را به خودتان ارجاع دهيد."); } if (this.TaskInstance.PerformerID != this.CurrentUserCode) { throw new UserException("اين كار دست شما نيست و بنابراين نميتوانيد آن را ارجاع دهيد."); } WorkflowObject.AssignTask(this.TaskInstanceID, this.CurrentUserCode, PerformerIDComboBox.SelectedValue, CommentTextBox.Text); NotifyMessage("با موفقيت انجام شد.", NotifyTypeEnum.Info); Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "Close", "setTimeout('window.close()', 1000)"); } catch (Exception ex) { ShowException(ex); } }
protected void rtb1_ButtonClick(object sender, Telerik.Web.UI.RadToolBarEventArgs e) { CN_CatCNac_ACYS negAcys = (CN_CatCNac_ACYS)Session["cnACYS"]; CatCNac_ACYS Acys = new CatCNac_ACYS(); object objCN_Acys = Acys; AsignacionCampos.AsignaCamposEntidad(ref objCN_Acys, "", this); int idMatriz = Int32.Parse(Request.QueryString["IdMatriz"]); Acys.Id_Matriz = idMatriz; Acys.FechaUltimaAct = DateTime.Now; Acys.FechaVencimiento = new DateTime(2017, 12, 31); Acys.Activo = true; if (Request.QueryString["Id"] == null || Request.QueryString["Id"] == "undefined") { negAcys.Nuevo(Acys); } else { int id = Int32.Parse(Request.QueryString["Id"]); Acys.Id = id; negAcys.Editar(Acys); } RAM1.ResponseScripts.Add("CloseAndRebind('Los datos se guardaron correctamente');"); }
protected void AssessmentToolbar_OnButtonClick(Object sender, Telerik.Web.UI.RadToolBarEventArgs e) { switch (e.Item.Text) { case "Save Assessment": Boolean saveAssessmentSuccess = MercuryApplication.MemberCaseCarePlanAssessmentSave(Assessment); if (!saveAssessmentSuccess) { // SET ERROR ExceptionMessageRow.Style.Clear(); ExceptionMessageLabel.Text = MercuryApplication.LastExceptionMessage; } else { Response.Redirect("/Application/MemberCase/MemberCase.aspx?MemberCaseId=" + Case.Id.ToString()); } break; } return; }
protected void RadToolBar2_ButtonClick(object sender, Telerik.Web.UI.RadToolBarEventArgs e) { switch (e.Item.Value) { case "Insert": ReportBind(); break; case "Delete": PowerBIMaintainUCO UCO = new PowerBIMaintainUCO(); System.Collections.Specialized.IOrderedDictionary[] dataIDs = Grid1.GetSelectedRowsKeys(); List <TB_EAI_PowerBIReport> Datas = new List <TB_EAI_PowerBIReport>(); if (dataIDs.Length > 0) { for (int i = 0; i < dataIDs.Length; i++) { Datas.Add( new TB_EAI_PowerBIReport { ApplicationID = dataIDs[i]["ApplicationID"].ToString(), WorkSpaceID = dataIDs[i]["WorkSpaceID"].ToString(), ReportID = dataIDs[i]["ReportID"].ToString() }); } if (UCO.DeleteTB_EAI_PowerBIReport(Datas)) { ReportBind(); } } break; } }
protected void RadToolBar1_ButtonClick(object sender, Telerik.Web.UI.RadToolBarEventArgs e) { if (e.Item.Value == "Refresh") { //DataSet dataSet = (DataSet) Cache["PageTableCache"]; ReBind(); } }
protected void RadToolBar1_ButtonClick(object sender, Telerik.Web.UI.RadToolBarEventArgs e) { string commandName = e.Item.Text; if (commandName == "Refresh") { ucHits.Refresh(); } }
protected void RadToolBar1_ButtonClick(object sender, Telerik.Web.UI.RadToolBarEventArgs e) { string commandName = e.Item.Text; if (commandName == "Forward to email") { ucProf_InquiryDetail1.ForwardToEmail(); } }
protected void RadToolBar1_ButtonClick(object sender, Telerik.Web.UI.RadToolBarEventArgs e) { string commandName = e.Item.Text; if (commandName == "Save") { ucProfile31.SaveProfile(); } }
protected void ctlbDeclaration_ButtonClick(object sender, Telerik.Web.UI.RadToolBarEventArgs e) { var argu = e.Item.AccessKey; if (argu == "h") { Response.ContentType = "/doc"; Response.AppendHeader("Content-Disposition", "attachment; filename=帮助文档.doc"); Response.TransmitFile(Server.MapPath("帮助文档.doc")); Response.End(); } }
protected void RadToolBar1_ButtonClick(object sender, Telerik.Web.UI.RadToolBarEventArgs e) { string commandName = e.Item.Text; if (commandName == "Refresh") { ucProf_Favourites1.Refresh(); } if (commandName == "Delete") { ucProf_Favourites1.DeleteSelected(); } }
protected void RadToolBar1_ButtonClick(object sender, Telerik.Web.UI.RadToolBarEventArgs e) { switch (e.Item.Value) { case "SendEmailAttachment": SendEmailAttachment(); break; case "ExportData": ExportData(); break; default: break; } }
protected void CarePlanToolbar_OnButtonClick(Object sender, Telerik.Web.UI.RadToolBarEventArgs e) { Telerik.Web.UI.RadToolBarButton button = (Telerik.Web.UI.RadToolBarButton)e.Item; if (button == null) { return; } switch (button.Text) { case "View by Problem Statement": CarePlanViewMode.Text = "ProblemStatement"; button.Text = "View by Care Plan"; MemberCaseCarePlanListView.Visible = (CarePlanViewMode.Text == "CarePlan"); ProblemClassListView.Visible = (CarePlanViewMode.Text == "ProblemStatement"); ProblemClassListView.Rebind(); break; case "View by Care Plan": CarePlanViewMode.Text = "CarePlan"; button.Text = "View by Problem Statement"; MemberCaseCarePlanListView.Visible = (CarePlanViewMode.Text == "CarePlan"); ProblemClassListView.Visible = (CarePlanViewMode.Text == "ProblemStatement"); MemberCaseCarePlanListView.Rebind(); break; default: break; } return; }
protected void RadToolBar1_ButtonClick(object sender, Telerik.Web.UI.RadToolBarEventArgs e) { string commandName = e.Item.Text; if (commandName == "Refresh") { ucProf_Inquiries1.Refresh(); } if (commandName == "Forward to email") { ucProf_Inquiries1.ForwardToEmail(); } if (commandName == "Delete") { ucProf_Inquiries1.DeleteSelected(); } }
protected void DesignerToolbar_OnButtonClick(Object sender, Telerik.Web.UI.RadToolBarEventArgs eventArgs) { switch (eventArgs.Item.Text) { case "Refresh": FormExplorerTree_Refresh(); FormControlPropertiesGrid_Refresh(); InitializeEventResultListener(); break; } return; }
protected void RadToolBar1_ButtonClick(object sender, Telerik.Web.UI.RadToolBarEventArgs e) { PowerBIMaintainUCO UCO = new PowerBIMaintainUCO(); switch (e.Item.Value) { case "Save": if (UCO.UploadApplicationID(hfApplicationID.Value, txtApplicationID.Text.Trim())) { lblAuthorityUrl2.Text = "https://login.microsoftonline.com/" + txtAuthorityUrl.Text + "/"; if (UCO.SaveTB_EAI_PowerBIApplication( new TB_EAI_PowerBIApplication() { ApplicationID = txtApplicationID.Text.Trim(), ApplicationDesc = txtApplicationDesc.Text.Trim(), UserName = txtUserName.Text.Trim(), Password = txtPassword.Text.Trim(), ApiUrl = txtApiUrl.Text.Trim(), ResourceUrl = txtResourceUrl.Text.Trim(), AuthorityUrl = lblAuthorityUrl2.Text.Trim() } , hfApplicationID.Value == "")) { ScriptManager.RegisterStartupScript( this.Page , this.Page.GetType() , Guid.NewGuid().ToString() , "alert('" + lblSaveSuccess.Text + "');" , true); ApplicatoinBind(); } else { ScriptManager.RegisterStartupScript( this.Page , this.Page.GetType() , Guid.NewGuid().ToString() , "alert('" + lblSaveError.Text + "');" , true); } } break; } }
protected void RadToolBar1_ButtonClick(object sender, Telerik.Web.UI.RadToolBarEventArgs e) { if (e.Item.Value == "HideOld") { Telerik.Web.UI.RadToolBarButton btn = (Telerik.Web.UI.RadToolBarButton)e.Item; if (btn != null) { Session["HideOld"] = btn.Checked; } Session["PubDateFilter"] = ((bool)Session["HideOld"]) ? DateTime.MaxValue : DateTime.MinValue; updateTreeMenu = true; Session["RefreshTree"] = true; } if (e.Item.Value == "CustomMenu") { doPopupCustomWindow(); } }
protected void MemberMetricToolbar_OnButtonClick(Object sender, Telerik.Web.UI.RadToolBarEventArgs eventArgs) { switch (eventArgs.Item.Text) { case "Show Hidden": MemberMetricShowHidden = !MemberMetricShowHidden; MemberMetricsGrid_CurrentPage = 0; MemberMetricsGrid.CurrentPageIndex = MemberMetricsGrid_CurrentPage; MemberMetricsGrid.DataSource = null; MemberMetricsGrid.Rebind(); break; } return; }
protected void MemberAuthorizedServiceToolbar_OnButtonClick(Object sender, Telerik.Web.UI.RadToolBarEventArgs eventArgs) { switch (eventArgs.Item.Text) { case "Show Hidden": MemberAuthorizedServiceShowHidden = !MemberAuthorizedServiceShowHidden; MemberAuthorizedServicesGrid_CurrentPage = 0; MemberAuthorizedServicesGrid.CurrentPageIndex = MemberAuthorizedServicesGrid_CurrentPage; MemberAuthorizedServicesGrid.DataSource = null; MemberAuthorizedServicesGrid.Rebind(); break; default: System.Diagnostics.Debug.WriteLine("MemberAuthorizedServiceToolbar_OnButtonClick: " + eventArgs.Item.Text); break; } return; }
protected void rtb1_ButtonClick(object sender, Telerik.Web.UI.RadToolBarEventArgs e) { CN_Correos cn_procierremes = new CN_Correos(); Correos correo = new Correos(); correo.Id_Emp = sesion.Id_Emp; correo.Id_Cd = sesion.Id_Cd_Ver; correo.Cor_CorreosAlmCob = TxtMailAlmCob.Text; correo.Cor_CorreosSvtaAlm = TxtMailSvtaAlm.Text; int verificador = 0; cn_procierremes.Guardar(correo, sesion.Emp_Cnx, ref verificador); if (verificador == 1) { Alerta("Los datos se guardaron correctamente"); } else { Alerta("Error al intentar guardar"); } }
protected void RadToolBar2_ButtonClick(object sender, Telerik.Web.UI.RadToolBarEventArgs e) { // Application["ApproveOnNextButton"] = true; //Ultrawebtoolbar2.Items.FromKeyButton("ApproveBeforeNext").Selected; string commentbox = GetCommentBox(); if (e.Item.Value == "Forward" || e.Item.Value == "ForwardDis" || e.Item.Value == "ForwardOnly") { string errmsg; CCDBaccess db = new CCDBaccess(); nCurrentCopySeparationSet = (int)Session["CurrentCopySeparationSet"]; int nPrevCopySeparationSet = nCurrentCopySeparationSet; if ((bool)Application["ApproveOnNextButton"] && (bool)Session["MayApprove"] && e.Item.Value != "ForwardOnly") { if (db.UpdateApproval((string)Session["UserName"], nCurrentCopySeparationSet, e.Item.Value == "Forward" ? 1 : 2, commentbox, out errmsg) == false) { //lblError.Text = "Could not update approve status - "+errmsg; } else { Session["CurrentApprovalState"] = 1; } if ((bool)Session["LogApprove"]) { db.UpdateApproveLog(nCurrentCopySeparationSet, 1, e.Item.Value == "Forward" ? true : false, "", (string)Session["UserName"], out errmsg); } } string sPageName = ""; int nApprove = 0; int version = 1; bool isMono = false; nCurrentCopySeparationSet = db.GetNextPage(nCurrentCopySeparationSet, false, out version, out sPageName, out nApprove, out isMono, out errmsg); // Are we at the end already? if (nCurrentCopySeparationSet == 0) { nCurrentCopySeparationSet = nPrevCopySeparationSet; sPageName = (string)Session["CurrentPageName"]; nApprove = (int)Session["CurrentApprovalState"]; version = (int)Session["CurrentVersion"]; } if ((string)Session["ShowSep"] != "CMYK" && (string)Session["ShowSep"] != "MASK" && (string)Session["ShowSep"] != "DNS" && (string)Session["ShowSep"] != "PDFCMYK" && (string)Session["ShowSep"] != "PDF" && (string)Session["ShowSep"] != "Raster") { Session["ShowSep"] = "CMYK"; } PrepareZoom(nCurrentCopySeparationSet, sPageName, nApprove, version, isMono, false); } if (e.Item.Value == "Backward" || e.Item.Value == "BackwardDis" || e.Item.Value == "BackwardOnly") { nCurrentCopySeparationSet = (int)Session["CurrentCopySeparationSet"]; int nPrevCopySeparationSet = nCurrentCopySeparationSet; CCDBaccess db = new CCDBaccess(); string errmsg = ""; if ((bool)Application["ApproveOnNextButton"] && (bool)Session["MayApprove"] && e.Item.Value != "BackwardOnly") { if (db.UpdateApproval((string)Session["UserName"], nCurrentCopySeparationSet, e.Item.Value == "Backward" ? 1 : 2, out errmsg) == false) { //lblError.Text = "Could not update approve status - "+errmsg; } else { Session["CurrentApprovalState"] = 1; } if ((bool)Session["LogApprove"]) { db.UpdateApproveLog(nCurrentCopySeparationSet, 1, e.Item.Value == "Backward" ? true : false, "", (string)Session["UserName"], out errmsg); } } string sPageName = ""; int nApprove = 0; int version = 1; bool isMono = false; nCurrentCopySeparationSet = db.GetPrevPage(nCurrentCopySeparationSet, false, out version, out sPageName, out nApprove, out isMono, out errmsg); // Are we at the front already? if (nCurrentCopySeparationSet == 0) { nCurrentCopySeparationSet = nPrevCopySeparationSet; sPageName = (string)Session["CurrentPageName"]; nApprove = (int)Session["CurrentApprovalState"]; version = (int)Session["CurrentVersion"]; } if ((string)Session["ShowSep"] != "CMYK" && (string)Session["ShowSep"] != "MASK" && (string)Session["ShowSep"] != "DNS" && (string)Session["ShowSep"] != "PDFCMYK" && (string)Session["ShowSep"] != "PDF" && (string)Session["ShowSep"] != "Raster") { Session["ShowSep"] = "CMYK"; } PrepareZoom(nCurrentCopySeparationSet, sPageName, nApprove, version, isMono, false); } bool colorButton = (e.Item.Value == "CMYK" || e.Item.Value == "C" || e.Item.Value == "M" || e.Item.Value == "Y" || e.Item.Value == "K" || e.Item.Value == "Mask" || e.Item.Value == "Dns" || e.Item.Value == "PDF" || e.Item.Value == "PDFCMYK" || e.Item.Value == "Raster"); if (colorButton) { Session["ShowSep"] = e.Item.Value.ToUpper(); PrepareZoom((int)Session["CurrentCopySeparationSet"], (string)Session["CurrentPageName"], (int)Session["CurrentApprovalState"], (int)Session["CurrentVersion"], (string)Session["ImageColors"] == "K", false); } }
protected void RadToolBar1_ButtonClick(object sender, Telerik.Web.UI.RadToolBarEventArgs e) { string commentbox = GetCommentBox(); Telerik.Web.UI.RadToolBarButton item = (Telerik.Web.UI.RadToolBarButton)RadToolBar2.FindItemByValue("SendMail"); if (item != null) { Session["SendMail"] = item.Checked; } nCurrentCopySeparationSet = (int)Session["CurrentCopySeparationSet"]; /* if (e.Button.Key == "Print") { * PrintImage((int)Session["CurrentCopySeparationSet"]); * } */ if (e.Item.Value == "Approve") { if ((bool)Session["MayApprove"] == false) { return; } string errmsg = ""; CCDBaccess db = new CCDBaccess(); if (db.UpdateApproval((string)Session["UserName"], nCurrentCopySeparationSet, 1, commentbox, out errmsg) == false) { //lblError.Text = "Could not update approve status - "+errmsg; } else { Session["CurrentApprovalState"] = 1; DisplayPageName(); } if ((bool)Session["LogApprove"]) { db.UpdateApproveLog(nCurrentCopySeparationSet, 1, true, commentbox, (string)Session["UserName"], out errmsg); } if ((bool)Session["CloseZoomAfterApprove"]) { if ((bool)Application["UseChannels"]) { Response.Redirect("ThumbnailViewChannels.aspx"); } else { Response.Redirect("Thumbnailview2.aspx"); } } } if (e.Item.Value == "Disapprove") { string errmsg = ""; if ((bool)Session["MayApprove"] == false) { return; } CCDBaccess db = new CCDBaccess(); if (db.UpdateApproval((string)Session["UserName"], nCurrentCopySeparationSet, 2, commentbox, out errmsg) == false) { //lblError.Text = "Could not update approve status - "+errmsg; } else { Session["CurrentApprovalState"] = 2; DisplayPageName(); if ((bool)Session["LogDisapprove"]) { if ((bool)Session["SetCommentOnDisapproval"] == true) { db.UpdateApproveLog(nCurrentCopySeparationSet, 1, false, commentbox, (string)Session["UserName"], out errmsg); } } if ((bool)Session["SendMail"]) { try { SmtpClient client = new SmtpClient((string)ConfigurationManager.AppSettings["SMTPServer"]); MailAddress cc = new MailAddress((string)ConfigurationManager.AppSettings["MailCC"]); MailMessage mailNew = new MailMessage((string)ConfigurationManager.AppSettings["MailFrom"], (string)ConfigurationManager.AppSettings["MailTo"]); mailNew.CC.Add((string)ConfigurationManager.AppSettings["MailCC"]); mailNew.Subject = (string)ConfigurationManager.AppSettings["MailSubject"]; mailNew.Attachments.Add(new Attachment((string)Session["RealImagePath"])); DateTime tPubDate = (DateTime)Session["SelectedPubDate"]; string pagename = (string)Session["SelectedPublication"] + "-" + (string)Session["SelectedSection"] + "-" + (string)Session["SelectedEdition"] + "-" + (string)Session["CurrentPageName"]; string mailBody = "The following page was rejected by user " + Session["UserName"] + "\n\n Page " + pagename + "\n\nComment: " + commentbox; mailNew.Body = mailBody; client.Send(mailNew); } catch //(System.Web.HttpException ehttp) { //lblError.Text = "Error sending email: Cannot reach server or your e-mail address was rejected ("+ ehttp.Message+")"; // return; } } } if ((bool)Session["CloseZoomAfterApprove"]) { if ((bool)Application["UseChannels"]) { Response.Redirect("ThumbnailViewChannels.aspx?Refresh=2"); } else { Response.Redirect("Thumbnailview2.aspx?Refresh=2"); } } } if (e.Item.Value == "Close") { if ((bool)Application["UseChannels"]) { Response.Redirect("ThumbnailViewChannels.aspx?Refresh=2"); } else { Response.Redirect("Thumbnailview2.aspx?Refresh=2"); } } }
protected void RadToolBar1_ButtonClick(object sender, Telerik.Web.UI.RadToolBarEventArgs e) { string errmsg = ""; if (e.Item.Value == "Forward") { // Are we at the end already? if ((int)Session["CurrentCopyFlatSeparationSet"] == 0) { PrepareZoom((int)Session["CurrentCopyFlatSeparationSet"]); return; } CCDBaccess db = new CCDBaccess(); nCurrentCopyFlatSeparationSet = db.GetNextFlat((int)Session["CurrentCopyFlatSeparationSet"], out errmsg); if (nCurrentCopyFlatSeparationSet == 0) { PrepareZoom((int)Session["CurrentCopyFlatSeparationSet"]); return; } if ((string)Session["ShowSep"] != "CMYK" && (string)Session["ShowSep"] != "DNS") { Session["ShowSep"] = "CMYK"; } PrepareZoom(nCurrentCopyFlatSeparationSet); } if (e.Item.Value == "Backward") { // Are we at the front already? if ((int)Session["CurrentCopyFlatSeparationSet"] == 0) { PrepareZoom((int)Session["CurrentCopyFlatSeparationSet"]); return; } CCDBaccess db = new CCDBaccess(); nCurrentCopyFlatSeparationSet = db.GetPreviousFlat((int)Session["CurrentCopyFlatSeparationSet"], out errmsg); if (nCurrentCopyFlatSeparationSet == 0) { PrepareZoom((int)Session["CurrentCopyFlatSeparationSet"]); return; } if ((string)Session["ShowSep"] != "CMYK" && (string)Session["ShowSep"] != "DNS") { Session["ShowSep"] = "CMYK"; } PrepareZoom(nCurrentCopyFlatSeparationSet); } if (e.Item.Value == "Release") { if ((bool)Session["MayRelease"] == false) { return; } CCDBaccess db = new CCDBaccess(); nCurrentCopyFlatSeparationSet = (int)Session["CurrentCopyFlatSeparationSet"]; if (nCurrentCopyFlatSeparationSet > 0) { db.UpdateCopyFlatHold(nCurrentCopyFlatSeparationSet, 0, 0, out errmsg); } if ((bool)Session["CloseZoomAfterApprove"]) { Response.Redirect("Flatview3.aspx"); } } if (e.Item.Value == "Approve") { if ((bool)Session["MayApprove"] == false) { return; } CCDBaccess db = new CCDBaccess(); nCurrentCopyFlatSeparationSet = (int)Session["CurrentCopyFlatSeparationSet"]; if (nCurrentCopyFlatSeparationSet > 0) { db.UpdateFlatApproval((string)Session["UserName"], nCurrentCopyFlatSeparationSet, 1, out errmsg); } if ((bool)Session["CloseZoomAfterApprove"]) { Response.Redirect("Flatview3.aspx"); } } if (e.Item.Value == "Disapprove") { if ((bool)Session["MayApprove"] == false) { return; } CCDBaccess db = new CCDBaccess(); nCurrentCopyFlatSeparationSet = (int)Session["CurrentCopyFlatSeparationSet"]; if (nCurrentCopyFlatSeparationSet > 0) { db.UpdateFlatApproval((string)Session["UserName"], nCurrentCopyFlatSeparationSet, 2, out errmsg); } if ((bool)Session["CloseZoomAfterApprove"]) { Response.Redirect("Flatview3.aspx"); } } if (e.Item.Value == "ReleaseBlack") { if ((bool)Session["MayRelease"] == false) { return; } CCDBaccess db = new CCDBaccess(); nCurrentCopyFlatSeparationSet = (int)Session["CurrentCopyFlatSeparationSet"]; if (nCurrentCopyFlatSeparationSet > 0) { db.UpdateCopyFlatHold(nCurrentCopyFlatSeparationSet, 0, 4, out errmsg); } if ((bool)Session["CloseZoomAfterApprove"]) { if ((bool)Application["SimpleFlatView"]) { Response.Redirect("Flatview3.aspx"); } else { Response.Redirect("Flatview2.aspx"); } } } if (e.Item.Value == "ReleaseSpecial") { if ((bool)Session["MayRelease"] == false) { return; } CCDBaccess db = new CCDBaccess(); nCurrentCopyFlatSeparationSet = (int)Session["CurrentCopyFlatSeparationSet"]; if (nCurrentCopyFlatSeparationSet > 0) { Telerik.Web.UI.RadWindow mywindow = RadWindowManager1.Windows[0]; // "radWindowReleaseLocations" mywindow.NavigateUrl = "ReleasePresses.aspx?CopyFlatSeparationSet=" + nCurrentCopyFlatSeparationSet.ToString(); mywindow.VisibleOnPageLoad = true; } } if (e.Item.Value == "Hold") { if ((bool)Session["MayRelease"] == false) { return; } CCDBaccess db = new CCDBaccess(); nCurrentCopyFlatSeparationSet = (int)Session["CurrentCopyFlatSeparationSet"]; if (nCurrentCopyFlatSeparationSet > 0) { db.UpdateCopyFlatHold(nCurrentCopyFlatSeparationSet, 1, 0, out errmsg); } if ((bool)Session["CloseZoomAfterApprove"]) { if ((bool)Application["SimpleFlatView"]) { Response.Redirect("Flatview3.aspx"); } else { Response.Redirect("Flatview2.aspx"); } } } if (e.Item.Value == "Close") { if ((bool)Application["SimpleFlatView"]) { Response.Redirect("Flatview3.aspx"); } else { Response.Redirect("Flatview2.aspx"); } } if (e.Item.Value == "CMYK" || e.Item.Value == "C" || e.Item.Value == "M" || e.Item.Value == "Y" || e.Item.Value == "K" || e.Item.Value == "CZ" || e.Item.Value == "MZ" || e.Item.Value == "YZ" || e.Item.Value == "KZ" || e.Item.Value == "Dns") { Session["ShowSep"] = e.Item.Value.ToUpper(); PrepareZoom((int)Session["CurrentCopyFlatSeparationSet"]); } }
protected void tblButtons_ButtonClick(object sender, Telerik.Web.UI.RadToolBarEventArgs e) { try { var x = TaskActionIDComboBox; if (string.IsNullOrEmpty(TaskActionIDComboBox.SelectedValue)) { txtFault.Text = "bbbb"; throw new UserException("ابتدا عملیات مورد نظر را انتخاب كنید."); } if (string.IsNullOrEmpty(PerformerIDComboBox.SelectedValue)) { txtFault.Text = "bbbb"; throw new UserException("ابتدا اقدام كننده بعدی را انتخاب كنید."); } txtFault.Text = ""; var taskActionId = Convert.ToInt32(TaskActionIDComboBox.SelectedValue); var taskActionManager = new TaskActionManager(); var returnActionList = taskActionManager.GetQuery(p => p.TaskActionCode == "Returen_Wrong_Request" || p.TaskActionCode == "Reject_By_Oprator" || p.TaskActionCode == "Reject_By_Leader" || p.TaskActionCode == "Cancellation_Request" || p.TaskActionCode == "Reject_By_EndUser" || p.TaskActionCode == "Reject_By_Expert") .Select(t => t.TaskActionID).ToList(); var check = returnActionList.Where(q => q == taskActionId); if (check.Any() && CommentTextBox.Text.Trim() == "") { lblMessage.Text = "ورود توضیحات اجباری می باشد"; return; } lblMessage.Text = ""; using (var wfs = new WorkflowService()) { var ta = wfs.GetTaskActionByID(taskActionId); WorkflowObject.FormatFinishTaskPage(this, FinishTaskUIEventsEnum.FT_OnBeforeActionButtonClick, TaskActionIDComboBox, PerformerIDComboBox, TaskInstance, ta); //if (TaskInstance.ExtraInt == 1) //{ // //WorkflowObject.FinishTask(TaskInstance.TaskInstanceID, 15, Utility.CurrentUserName, "12345", // // "auto forwarded by expert!"); //} //else //{ try{ var ti = WorkflowObject.FinishTask(TaskInstance, ta, CurrentUserCode, PerformerIDComboBox.SelectedValue, CommentTextBox.Text, null); // LogManager.Log(ti.TaskInstanceID.ToString(), LogActionStatus.AddNewTaskInstance.ToString(), string.Format("action {0} assign to {1}", TaskActionIDComboBox.SelectedValue, PerformerIDComboBox.SelectedValue), ti.EntityKey.EntitySetName);//Chang by ahmadpoor LogManager.Log(ti.TaskInstanceID.ToString(), LogActionStatus.AddNewTaskInstance.ToString(), string.Format(" {0} " + " - " + "گیرنده" + " :" + " {1} ", TaskActionIDComboBox.SelectedItem.Text, PerformerIDComboBox.SelectedItem.Text), ti.EntityKey.EntitySetName);//Chang by ahmadpoor } catch (Exception) { } //} //todo : check with arash try { WorkflowObject.FormatFinishTaskPage(this, FinishTaskUIEventsEnum.FT_OnAfterActionButtonClick, TaskActionIDComboBox, PerformerIDComboBox, TaskInstance, ta); } catch (Exception) { } } NotifyMessage("با موفقیت انجام شد.", NotifyTypeEnum.Info); tblButtons.Items[0].Enabled = false; } catch (Exception ex) { ShowException(ex); } }
protected void RadToolBar1_ButtonClick(object sender, Telerik.Web.UI.RadToolBarEventArgs e) { DoDataBind(); }
protected void EditorToolbar_OnButtonClick(Object sender, Telerik.Web.UI.RadToolBarEventArgs eventArgs) { switch (eventArgs.Item.Text) { case "Compile": Mercury.Client.Core.Forms.Form designerForm = DesignerForm; Mercury.Client.Core.Forms.Control eventControl = designerForm.FindControlById(new Guid(DocumentControlId.Text)); Mercury.Server.Application.FormControlEventHandler eventHandler = eventControl.GetEventHandler(EventName.Text); if (eventHandler == null) { eventHandler = new Mercury.Server.Application.FormControlEventHandler(); eventControl.EventHandlers.Add(eventHandler); } eventHandler.EventName = EventName.Text; eventHandler.ExecuteClientSide = ((Telerik.Web.UI.RadToolBarButton)EditorToolbar.Items[0]).Checked; eventHandler.SmartEvent = ((Telerik.Web.UI.RadToolBarButton)EditorToolbar.Items[2]).Checked; eventHandler.MethodSource = FormatSourceCode(ScriptEditor.Text); List <Mercury.Server.Application.FormCompileMessage> compileMessages; compileMessages = eventControl.EventHandler_Compile(EventName.Text); EditorToolbar.Items[5].Text = "Errors (" + compileMessages.Count.ToString() + ")"; System.Data.DataTable errorListTable = new System.Data.DataTable(); errorListTable.Columns.Add("ErrorLine"); errorListTable.Columns.Add("ErrorColumn"); errorListTable.Columns.Add("ErrorText"); foreach (Mercury.Server.Application.FormCompileMessage currentMessage in compileMessages) { errorListTable.Rows.Add(currentMessage.Line, currentMessage.Column, currentMessage.Description); } ErrorListGrid.DataSource = errorListTable; ErrorListGrid.DataBind(); break; case "Save": Save(sender, new EventArgs()); break; case "Save and Close": Save(sender, new EventArgs()); TelerikAjaxManager.ResponseScripts.Add("CloseWindow ();"); break; } return; }
protected void RadToolBar1_ButtonClick(object sender, Telerik.Web.UI.RadToolBarEventArgs e) { LoadLog((int)Session["LogToView"]); }
protected void AssessmentToolbar_OnItemCreated(Object sender, Telerik.Web.UI.RadToolBarEventArgs e) { return; }
protected void RadToolBar1_ButtonClick(object sender, Telerik.Web.UI.RadToolBarEventArgs e) { Telerik.Web.UI.RadToolBarButton item1 = (Telerik.Web.UI.RadToolBarButton)RadToolBar1.FindItemByValue("SendMail"); if (item1 != null) { Session["SendMail"] = item1.Checked; } string comment = GetCommentBox(); Telerik.Web.UI.RadToolBarItem item = RadToolBar1.FindItemByValue("Item3"); if (item == null) { return; } Label lbl = (Label)item.FindControl("PageName"); string errmsg = ""; if (e.Item.Value == "Forward") { // Are we at the end already? if ((int)Session["CurrentCopySeparationSet2"] == 0) { PrepareZoom((int)Session["CurrentCopySeparationSet"], (int)Session["CurrentCopySeparationSet2"], (string)Session["CurrentPageName"], (string)Session["CurrentPageName2"], (int)Session["CurrentApprovalState"]); return; } CCDBaccess db = new CCDBaccess(); string sPageNameLeft = ""; int nApproveLeft = 0; nCurrentCopySeparationSet = db.GetReadviewNextPage((int)Session["CurrentCopySeparationSet2"], out sPageNameLeft, out nApproveLeft, out errmsg); string sPageNameRight = ""; int nApproveRight = 1; nCurrentCopySeparationSet2 = db.GetReadviewNextPage(nCurrentCopySeparationSet, out sPageNameRight, out nApproveRight, out errmsg); if (nCurrentCopySeparationSet == 0 && nCurrentCopySeparationSet2 == 0) { PrepareZoom((int)Session["CurrentCopySeparationSet"], (int)Session["CurrentCopySeparationSet2"], (string)Session["CurrentPageName"], (string)Session["CurrentPageName2"], (int)Session["CurrentApprovalState"]); return; } if ((string)Session["ShowSep"] != "CMYK" && (string)Session["ShowSep"] != "MASK") { Session["ShowSep"] = "CMYK"; } PrepareZoom(nCurrentCopySeparationSet, nCurrentCopySeparationSet2, sPageNameLeft, sPageNameRight, nCurrentCopySeparationSet > 0 ? nApproveLeft : nApproveRight); } if (e.Item.Value == "Backward") { // Are we at the front already? if ((int)Session["CurrentCopySeparationSet"] == 0) { PrepareZoom((int)Session["CurrentCopySeparationSet"], (int)Session["CurrentCopySeparationSet2"], (string)Session["CurrentPageName"], (string)Session["CurrentPageName2"], (int)Session["CurrentApprovalState"]); return; } CCDBaccess db = new CCDBaccess(); string sPageNameLeft = ""; int nApproveLeft = 0; string sPageNameRight = ""; int nApproveRight = 1; nCurrentCopySeparationSet2 = db.GetReadviewPrevPage((int)Session["CurrentCopySeparationSet"], out sPageNameRight, out nApproveRight, out errmsg); nCurrentCopySeparationSet = db.GetReadviewPrevPage(nCurrentCopySeparationSet2, out sPageNameLeft, out nApproveLeft, out errmsg); if (nCurrentCopySeparationSet == 0 && nCurrentCopySeparationSet2 == 0) { PrepareZoom((int)Session["CurrentCopySeparationSet"], (int)Session["CurrentCopySeparationSet2"], (string)Session["CurrentPageName"], (string)Session["CurrentPageName2"], (int)Session["CurrentApprovalState"]); return; } if ((string)Session["ShowSep"] != "CMYK" && (string)Session["ShowSep"] != "MASK") { Session["ShowSep"] = "CMYK"; } PrepareZoom(nCurrentCopySeparationSet, nCurrentCopySeparationSet2, sPageNameLeft, sPageNameRight, nCurrentCopySeparationSet > 0 ? nApproveLeft : nApproveRight); } if (e.Item.Value == "Approve") { if ((bool)Session["MayApprove"] == false) { return; } CCDBaccess db = new CCDBaccess(); nCurrentCopySeparationSet = (int)Session["CurrentCopySeparationSet"]; nCurrentCopySeparationSet2 = (int)Session["CurrentCopySeparationSet2"]; if (nCurrentCopySeparationSet > 0) { if (db.UpdateApproval((string)Session["UserName"], nCurrentCopySeparationSet, 1, out errmsg) == false) { lbl.Text = "Could not update approve status"; } else { Session["CurrentApprovalState"] = 1; lbl.Text = "Page " + (string)Session["CurrentPageName"] + " is currently APPROVED"; } } if (nCurrentCopySeparationSet2 > 0) { if (db.UpdateApproval((string)Session["UserName"], nCurrentCopySeparationSet2, 1, out errmsg) == false) { lbl.Text = "Could not update approve status"; } else { Session["CurrentApprovalState"] = 1; lbl.Text = "Page " + (string)Session["CurrentPageName"] + " is currently APPROVED"; } } if ((bool)Session["LogApprove"]) { if (nCurrentCopySeparationSet > 0) { db.UpdateApproveLog(nCurrentCopySeparationSet, 1, true, "", (string)Session["UserName"], out errmsg); } if (nCurrentCopySeparationSet2 > 0) { db.UpdateApproveLog(nCurrentCopySeparationSet2, 1, true, "", (string)Session["UserName"], out errmsg); } } if ((bool)Session["CloseZoomAfterApprove"]) { Response.Redirect("ReadView.aspx"); } } if (e.Item.Value == "Disapprove") { if ((bool)Session["MayApprove"] == false) { return; } CCDBaccess db = new CCDBaccess(); nCurrentCopySeparationSet = (int)Session["CurrentCopySeparationSet"]; nCurrentCopySeparationSet2 = (int)Session["CurrentCopySeparationSet2"]; if (nCurrentCopySeparationSet > 0) { if (db.UpdateApproval((string)Session["UserName"], nCurrentCopySeparationSet, 2, out errmsg) == false) { lbl.Text = "Could not update approve status"; } else { Session["CurrentApprovalState"] = 2; lbl.Text = "Page " + (string)Session["CurrentPageName"] + " is currently REJECTED"; if ((bool)Session["LogDisapprove"]) { db.UpdateApproveLog(nCurrentCopySeparationSet, 1, false, comment, (string)Session["UserName"], out errmsg); } if ((bool)Session["SendMail"]) { try { SmtpClient client = new SmtpClient((string)ConfigurationManager.AppSettings["SMTPServer"]); MailAddress cc = new MailAddress((string)ConfigurationManager.AppSettings["MailCC"]); MailMessage mailNew = new MailMessage((string)ConfigurationManager.AppSettings["MailFrom"], (string)ConfigurationManager.AppSettings["MailTo"]); mailNew.CC.Add((string)ConfigurationManager.AppSettings["MailCC"]); mailNew.Subject = (string)ConfigurationManager.AppSettings["MailSubject"]; mailNew.Attachments.Add(new Attachment((string)Session["RealImagePath"])); DateTime tPubDate = (DateTime)Session["SelectedPubDate"]; string pagename = (string)Session["SelectedPublication"] + "-" + (string)Session["SelectedSection"] + "-" + (string)Session["SelectedEdition"] + "-" + (string)Session["CurrentPageName"]; string mailBody = "The following page was rejected by user " + (string)Session["UserName"] + "\n\n Page " + pagename + "\n\nComment: " + comment; mailNew.Body = mailBody; client.Send(mailNew); } catch // (System.Web.HttpException ehttp) { } } } } if (nCurrentCopySeparationSet2 > 0) { if (db.UpdateApproval((string)Session["UserName"], nCurrentCopySeparationSet2, 2, out errmsg) == false) { lbl.Text = "Could not update approve status"; } else { Session["CurrentApprovalState"] = 2; lbl.Text = "Page " + (string)Session["CurrentPageName2"] + " is currently REJECTED"; if ((bool)Session["LogDisapprove"]) { db.UpdateApproveLog(nCurrentCopySeparationSet2, 1, false, comment, (string)Session["UserName"], out errmsg); } if ((bool)Session["SendMail"]) { try { // MailMessage mailNew = (MailMessage)Session["CurrentMail"]; SmtpClient client = new SmtpClient((string)ConfigurationManager.AppSettings["SMTPServer"]); MailAddress cc = new MailAddress((string)ConfigurationManager.AppSettings["MailCC"]); MailMessage mailNew = new MailMessage((string)ConfigurationManager.AppSettings["MailFrom"], (string)ConfigurationManager.AppSettings["MailTo"]); mailNew.CC.Add((string)ConfigurationManager.AppSettings["MailCC"]); mailNew.Subject = (string)ConfigurationManager.AppSettings["MailSubject"]; mailNew.Attachments.Add(new Attachment((string)Session["RealImagePath"])); DateTime tPubDate = (DateTime)Session["SelectedPubDate"]; string pagename = (string)Session["SelectedPublication"] + "-" + (string)Session["SelectedSection"] + "-" + (string)Session["SelectedEdition"] + "-" + (string)Session["CurrentPageName2"]; string mailBody = "The following page was rejected by user " + (string)Session["UserName"] + "\n\n Page " + pagename + "\n\nComment: " + comment; mailNew.Body = mailBody; client.Send(mailNew); } catch // (System.Web.HttpException ehttp) { } } } } if ((bool)Session["CloseZoomAfterApprove"]) { Response.Redirect("ReadView.aspx"); } } if (e.Item.Value == "Close") { Response.Redirect("ReadView.aspx"); } if (e.Item.Value == "CMYK" || e.Item.Value == "Mask") { Session["ShowSep"] = e.Item.Value.ToUpper(); PrepareZoom((int)Session["CurrentCopySeparationSet"], (int)Session["CurrentCopySeparationSet2"], (string)Session["CurrentPageName"], (string)Session["CurrentPageName2"], (int)Session["CurrentApprovalState"]); } }
protected void rtb1_ButtonClick(object sender, Telerik.Web.UI.RadToolBarEventArgs e) { }