protected void fvVendorDetails_ItemCommand(object sender, FormViewCommandEventArgs e) { if (e.CommandName == "RenewVendorLicense") { Guid licID =new Guid (gvRenewVendor.SelectedDataKey.Value.ToString()); string IssueDate = ((TextBox) fvVendorDetails.FindControl("txtIssueDate")).Text; string EffectiveDate = ((TextBox) fvVendorDetails.FindControl("txtEffectiveDate")).Text; string ExpiryDate = ((TextBox) fvVendorDetails.FindControl("txtExpiryDate")).Text; ObjReNewLic.RenewVendorLicenses(Convert.ToDateTime(IssueDate), Convert.ToDateTime(EffectiveDate), Convert.ToDateTime(ExpiryDate), licID); mvLicRenew.SetActiveView(mvLicRenew.Views[0]); txtLicenseNo.Text = ""; } if (e.CommandName == "RejectVendorLicense") { Guid licID = new Guid(gvRenewVendor.SelectedDataKey.Value.ToString()); objLicRej.RejectVenorLicense(licID); } if (e.CommandName == "UpdateAppDate") { string ReNewAppDate = ((TextBox) fvVendorDetails.FindControl("txtApplicationDate")).Text; Guid licID = new Guid(gvRenewVendor.SelectedDataKey.Value.ToString()); objLicRej.RenewAppDate(licID, Convert.ToDateTime(ReNewAppDate)); //fvVendorDetails.ChangeMode(FormViewMode.Edit); mvLicRenew.SetActiveView(mvLicRenew.Views[0]); ((IGRSS_Default)this.Master).ShowStatusMessage(Status_Messages.SaveSucess, Status_Messages.SaveSucessDescription, MessageType.Success); } }
protected void SelectedPatientFormView_ItemCommand(object sender, FormViewCommandEventArgs e) { if (e.CommandName == "Cancel") { SelectedPatientFormView.ChangeMode(FormViewMode.ReadOnly); UpdatePatientExceptionLabel.Visible = false; } if (e.CommandName == "Close") { if (IsPatientUpdated) { SelectedEvent = EventTypes.Selected; RefreshParentDialog(); } else Response.Write("<script>window.opener='x';window.close();</script>"); } if (e.CommandName == "Delete") { } if (e.CommandName == "ShowFutureBookings") { GridView futureBookingsGridView = (GridView)SelectedPatientFormView.Row.FindControl("FutureBookingsGridView"); futureBookingsGridView.DataBind(); futureBookingsGridView.Visible = true; } }
protected void fvVendorDetails_ItemCommand(object sender, FormViewCommandEventArgs e) { if (e.CommandName == "ApproveVendorLicense") { Guid licID = new Guid(fldApplicationId.Value); string LicenseNo = ((TextBox)fvVendorDetails.FindControl("txtLicNo")).Text; string IssueDate = ((TextBox)fvVendorDetails.FindControl("txtIssueDate")).Text; string EffectiveDate = ((TextBox)fvVendorDetails.FindControl("txtEffectiveDate")).Text; string ExpiryDate = ((TextBox)fvVendorDetails.FindControl("txtExpiryDate")).Text; Guid AlertId = (Guid)ViewState["AlertId"]; objLicApproved.ApprovedVendorLicense(licID, LicenseNo, Convert.ToDateTime(IssueDate), Convert.ToDateTime(EffectiveDate), Convert.ToDateTime(ExpiryDate), AlertId); mvLicApprove.SetActiveView(mvLicApprove.Views[0]); txtApplicationNo.Text = ""; Dictionary<string, string> reportParams = new Dictionary<string, string>(); string ApplnNo = ((TextBox)fvVendorDetails.FindControl("ApplnNumberTextBox")).Text; reportParams.Add("ApplnNumber", ApplnNo); Session["ReportParams"] = reportParams; Session["ReportName"] = "LicenseApplicationAcknowledgement"; Response.Redirect("~/Report/Report.aspx"); } if (e.CommandName == "RejectVendorLicense") { //Guid licID = new Guid(grdVen_Dtl.SelectedDataKey.Value.ToString()); Guid licID = new Guid(fldApplicationId.Value); objLicApproved.RejectVenorLicense(licID); mvLicApprove.SetActiveView(mvLicApprove.Views[0]); txtApplicationNo.Text = ""; WorkflowSupport.DeleteAlert(new Guid(ViewState["AlertId"].ToString())); ((IGRSS_Default)this.Master).ShowStatusMessage("Application Rejected", "The Application has been rejeced", MessageType.Success); } }
protected void frmRole_ItemCommand(object sender, FormViewCommandEventArgs e) { if (e.CommandName == "Cancel") { Response.Redirect("Roles.aspx"); } }
protected void frmPackage_ItemCommand(object sender, FormViewCommandEventArgs e) { if (e.CommandName == "Insert" || e.CommandName == "Update") { CurrencyField ucCurrFieldPrice = frmPackage.FindControl("ucCurrFieldPrice") as CurrencyField; CurrencyField ucCurrFieldValueByHour = frmPackage.FindControl("ucCurrFieldValueByHour") as CurrencyField; CurrencyField ucCurrFieldSetupFee = frmPackage.FindControl("ucCurrFieldSetupFee") as CurrencyField; CurrencyField ucCurrFieldProductPrice = frmPackage.FindControl("ucCurrFieldProductPrice") as CurrencyField; if (!ucCurrFieldPrice.CurrencyValue.HasValue) ucCurrFieldPrice.CurrencyValue = 0; if (!ucCurrFieldValueByHour.CurrencyValue.HasValue) ucCurrFieldValueByHour.CurrencyValue = 0; if (!ucCurrFieldSetupFee.CurrencyValue.HasValue) ucCurrFieldSetupFee.CurrencyValue = 0; if (!ucCurrFieldProductPrice.CurrencyValue.HasValue) ucCurrFieldProductPrice.CurrencyValue = 0; } else if (e.CommandName == "Cancel") Response.Redirect("Packages.aspx"); }
protected void FormView1_ItemCommand(object sender, FormViewCommandEventArgs e) { if (e.CommandName == "Add to Cart") { FormViewRow row = this.FormView1.Row; string strPartid = Request.QueryString["prod"]; TextBox tboxQty = (TextBox)row.FindControl("txtQty"); Int32 intQty = Convert.ToInt32(tboxQty.Text); string sqlString; OleDbConnection myConn = new OleDbConnection(); myConn.ConnectionString = this.SqlDataSource1.ConnectionString; if (myConn.State == ConnectionState.Closed) myConn.Open(); sqlString = "insert into Cart_LineItems values (" + Session["cartid"] + ", '" + strPartid + "', '" + intQty.ToString() + "');"; OleDbCommand myCommand = new OleDbCommand(sqlString, myConn); try { myCommand.ExecuteNonQuery(); myConn.Close(); this.lblAdMessage.Text = "Added to Cart."; } catch (Exception ex) { this.lblErMessage.Text = "Cannot add record" + ex.Message; } myConn.Close(); } }
//PATIENT UPDATE protected void subAdmin(object sender, FormViewCommandEventArgs e) { switch (e.CommandName) { case "Upd": if (Page.IsValid) { HiddenField hdfIDU = fmv_patients.FindControl("hdf_idU") as HiddenField; TextBox txtFNameU = fmv_patients.FindControl("txt_fnameU") as TextBox; TextBox txtLNameU = fmv_patients.FindControl("txt_lnameU") as TextBox; TextBox txtPatNumU = fmv_patients.FindControl("txt_pat_numU") as TextBox; TextBox txtHCardU = fmv_patients.FindControl("txt_hcardU") as TextBox; DropDownList ddlTriageU = fmv_patients.FindControl("ddl_triageU") as DropDownList; int _triageU = int.Parse(ddlTriageU.SelectedValue.ToString()); _strMessage(objLinq.commitPatientUpdate(int.Parse(hdfIDU.Value.ToString()), txtFNameU.Text, txtLNameU.Text, int.Parse(txtPatNumU.Text), int.Parse(txtHCardU.Text), _triageU), "updated"); _subRebind(); } break; case "Can": mpe_patient.Hide(); break; } }
protected void OneRoleForm_ItemCommand(object sender, FormViewCommandEventArgs e) { if (e.CommandName.ToString().Equals("Cancel")) { this.OneRoleForm.ChangeMode(FormViewMode.ReadOnly); this.OneRole_ODTS.DataBind(); } }
protected void frmFunctions_ItemCommand(object sender, FormViewCommandEventArgs e) { if (e.CommandName == "Cancel") { showGrid(); } }
protected void NewPatientFormView_ItemCommand(object sender, FormViewCommandEventArgs e) { if (e.CommandName == "Cancel") { Response.Write("<script>window.opener='x';window.close();</script>"); } }
protected void OneLanguageEditForm_ItemCommand(object sender, FormViewCommandEventArgs e) { if (e.CommandName.ToString().Equals("Cancel")) { this.GridView1.SelectedIndex = -1; this.OneLang_ODTS.DataBind(); this.UpdatePanel2.Update(); } }
protected void fv_gateway_name_ItemCommand(object sender, FormViewCommandEventArgs e) { if (e.CommandName == "my_update") { hf_proposed_username.Value = (fv_gateway_name.FindControl("tb_gateway_name") as TextBox).Text; //if they just want to un-link an account if (hf_proposed_username.Value == "") { string editingGatewayUsername1 = hf_username.Value; string contactID1 = hf_contact_id.Value; UpdateGatewayIDToNull(editingGatewayUsername1, contactID1); fv_gateway_name.DataBind(); fv_gateway_name.ChangeMode(FormViewMode.ReadOnly); gv_gateway.DataBind(); setGatewayProfile(); pnl_gateway_contact_popup.DataBind(); return; } //check if proposed username is a gateway account gv_username_exists.DataBind(); if (gv_username_exists.Rows.Count == 0) { ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "alertUsernameDoesNotExist()", true); return; } //warn if used by other contacts gv_username_warning.DataBind(); if (gv_username_warning.Rows.Count > 0) { mpe_username_warning.Show(); return; } //go ahead if not used by other contacts. string editingGatewayUsername = hf_username.Value; string contactID = hf_contact_id.Value; string newGatewayUsername = hf_proposed_username.Value; try { UpdateGatewayID(editingGatewayUsername, contactID, newGatewayUsername); } catch //violation of unique key constraint { ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "alertUsernamePermissionDenied()", true); return; } fv_gateway_name.DataBind(); fv_gateway_name.ChangeMode(FormViewMode.ReadOnly); gv_gateway.DataBind(); setGatewayProfile(); pnl_gateway_contact_popup.DataBind(); return; } }
protected void frmCheck_ItemCommand(object sender, FormViewCommandEventArgs e) { if (e.CommandName == "Update" || e.CommandName == "Insert") { TextBox CheckValueTextBox = frmCheck.FindControl("CheckValueTextBox") as TextBox; CheckValueTextBox.Text = FormatDouble(CheckValueTextBox); } else if (e.CommandName == "Cancel") Response.Redirect("Checks.aspx"); }
protected void FormView_HighCourtReg_ItemCommand(object sender, FormViewCommandEventArgs e) { switch (e.CommandName) { case "Back": Multiview_HighCourtReg.SetActiveView(ViewGrid); GridView_HighCourtReg.DataBind(); break; } }
protected void FormView_AppealRegister_ItemCommand(object sender, FormViewCommandEventArgs e) { switch (e.CommandName) { case "Back": Multiview_AppealRegister.SetActiveView(ViewGrid); GridView_AppealRegister.DataBind(); break; } }
protected void FormView_worksheet_ItemCommand(object sender, FormViewCommandEventArgs e) { switch (e.CommandName) { case "Back": MultiView_worksheet.SetActiveView(viewGrid); GridView_worksheet.DataBind(); break; } }
protected void frmEquipment_ItemCommand(object sender, FormViewCommandEventArgs e) { if (e.CommandName == "Cancel") { frmEquipment.Visible = false; grdEquipments.Visible = true; } }
protected void FormView_ApplicationDisposal_ItemCommand(object sender, FormViewCommandEventArgs e) { switch (e.CommandName) { case "Back": Multiview_ApplicationDisposal.SetActiveView(View1_GridView); View1_GridView.DataBind(); infoDiv.Visible = false; break; } }
protected void frmAddUser_ItemCommand(object sender, FormViewCommandEventArgs e) { if (e.CommandName == "Insert") { if (!Page.IsValid) { HttpContext.Current.Cache["LastError"] = "Sorry, we couldn't validate the details you entered. Make sure your browser has javascript enabled"; Response.Redirect(ErrorPage); } } }
protected void FormView_SunavniRegister_ItemCommand(object sender, FormViewCommandEventArgs e) { switch (e.CommandName) { case "Back": Multiview_SunavniRegister.SetActiveView(ViewGrid); GridView_SunavniRegister.DataBind(); infoDiv.Visible = false; break; } }
protected void FormView_Kalpataru_ItemCommand(object sender, FormViewCommandEventArgs e) { switch (e.CommandName) { case "Back": Multiview_Kalpataru.SetActiveView(View1_GridView_Kalpataru); View1_GridView_Kalpataru.DataBind(); infoDiv.Visible = false; break; } }
protected void FormView_SOFile_ItemCommand(object sender, FormViewCommandEventArgs e) { switch (e.CommandName) { case "Back": Multiview_SOFile.SetActiveView(GridView); GridView.DataBind(); infoDiv.Visible = false; break; } }
protected void FormView_NoRecordCertficate_ItemCommand(object sender, FormViewCommandEventArgs e) { switch (e.CommandName) { case "Back": Multiview_NoRecordCertificate.SetActiveView(view1_GridView); view1_GridView.DataBind(); infoDiv.Visible = false; break; } }
protected void FvOutward_ItemCommand(object sender, FormViewCommandEventArgs e) { switch (e.CommandName) { case "Back": mvOutwardRegister.SetActiveView(vieGrid); break; case "UpdateData": break; } }
protected void FormView_LekhanSamagri_ItemCommand(object sender, FormViewCommandEventArgs e) { switch (e.CommandName) { case "Back": Multiview_LekhanSamagri.SetActiveView(View1_LekhanSamagri); View1_LekhanSamagri.DataBind(); infoDiv.Visible = false; break; } }
protected void FvAssignOfficer_ItemCommand(object sender, FormViewCommandEventArgs e) { if (e.CommandName == "AssignOfficer") { Complain cmp = new Complain(); DropDownList ddlOffice = (DropDownList)FvAssignOfficer.FindControl("ddlOfficeName"); DropDownList ddlDesig = (DropDownList)FvAssignOfficer.FindControl("ddlDesigination"); string[] officer = WorkflowSupport.GetUserAtOfficeRole(new Guid(ddlOffice.SelectedValue), new Guid(ddlDesig.SelectedValue)); cmp.AssignEnquiryOfficer(officer[0], new Guid(fldComplainId.Value)); Response.Redirect("~/"); } }
protected void FormView_BookForm_ItemCommand(object sender, FormViewCommandEventArgs e) { switch (e.CommandName) { case "Back": Multiview_BookFormsRegister.SetActiveView(view1_GridView); view1_GridView.DataBind(); infoDiv.Visible = false; break; } }
protected void FormView_Marriage_ItemCommand(object sender, FormViewCommandEventArgs e) { switch (e.CommandName) { case "Back": Multiview_Marriage_Volume.SetActiveView(View1_Gridview_MarriageVolume); GridView_MarriageVolume.DataBind(); infoDiv.Visible = false; break; } }
protected void ProductFormView_ItemCommand(object sender, FormViewCommandEventArgs e) { ShoppingCartItem cart = new ShoppingCartItem(); if (Session["UserName"] != null) { if (e.CommandName == "AddToCartcmd") AddToCart(cart); if (e.CommandName == "WishListcmd") AddToWishList(); } }
protected void FormView_RecruitmentMaster_ItemCommand(object sender, FormViewCommandEventArgs e) { switch (e.CommandName) { case "Cancel": Multiview_RecruitmentMaster.SetActiveView(ViewGrid); GridView_RecruitmentMaster.DataBind(); infoDiv.Visible = false; break; } }