public void ClearForm() { treelistCodeRuleData.CancelEdit(); ASPxEdit.ClearEditorsInContainer(formlayoutArtifactCodeRuleEditingForm); cbbArtifactType.IsValid = true; txtArtifactCodeRuleName.IsValid = true; }
protected void btnClear_Click(object sender, EventArgs e) { ASPxEdit.ClearEditorsInContainer(FormLayoutCustomerMaster); btnDelete.Enabled = false; //btnSave.Enabled = false; ddCustomerCode.Enabled = true; //ddCustomerCode.DataBind(); return; //ddCustomerLookup.Text = ""; //cmbCustomerType.Text = ""; //txtCustomerName.Text = ""; //txtAddress1.Text = ""; //txtAddress2.Text = ""; //txtAddress3.Text = ""; //txtNICNo.Text = ""; //txtNTNNo.Text = ""; //txtSaleTaxRegNo.Text = ""; //txtDistance.Text = ""; //txtPhoneNumber.Text = ""; //txtCellNumber.Text = ""; //txtFaxNumber.Text = ""; //txtEmail.Text = ""; //txtURL.Text = ""; //spnCreditDays.Text = ""; //txtCreditLimit.Text = ""; //txtContactPerson.Text = ""; //txtFatherHusband.Text = ""; }
protected void callbackpanelAdd_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e) { try { using (var connection = new OracleConnection(ConfigurationManager.ConnectionStrings["DBConnection"].ConnectionString)) { connection.Open(); string query = "INSERT INTO TABLEMERGEPDF (TITLE, FILEATTACHMENT, FILENAME) VALUES (:TITLE, :FILEATTACHMENT, :FILENAME)"; using (var cmd = new OracleCommand(query, connection)) { cmd.Parameters.Add("TITLE", OracleDbType.NVarchar2).Value = textboxTitle.Text; cmd.Parameters.Add("FILEATTACHMENT", OracleDbType.Blob).Value = Session["FILE"]; cmd.Parameters.Add("FILENAME", OracleDbType.NVarchar2).Value = Session["FILENAME"]; cmd.ExecuteNonQuery(); } ASPxEdit.ClearEditorsInContainer(callbackpanelAdd); labelMessage.Text = "Successfull added!"; labelMessage.Visible = true; } } catch (OracleException ex) { labelMessage.Text = ex.Message; labelMessage.Visible = true; } }
public void ClearForm() { gridviewAllocationAccountTemplate.CancelEdit(); ASPxEdit.ClearEditorsInContainer(formlayoutAllocationEditingForm); gridlookupAccountActorType.GridView.Selection.UnselectAll(); ClearFormValidation(); }
private void ClearForm() { //clear all fields inside form layout ASPxEdit.ClearEditorsInContainer(frmManufacturerEdit); pagMunufacturer.ActiveTabIndex = 0; cbRowStatus.SelectedIndex = 0; txtCode.IsValid = true; txtName.IsValid = true; }
public void ClearForm() { //clear all fields inside form layout ASPxEdit.ClearEditorsInContainer(frmlManufactureCategory); pagManufacturerGroupEdit.ActiveTabIndex = 0; cbRowStatus.SelectedIndex = 0; HtmlEditorDescription.Html = String.Empty; txtCode.IsValid = true; txtName.IsValid = true; }
private void ClearForm() { //clear all fields inside form layout ASPxEdit.ClearEditorsInContainer(frmReceiptVouches); txtCode.IsValid = true; cbSourceOrganization.IsValid = true; cbVouchesType.IsValid = true; dateIssuedDate.IsValid = true; grdVouchersAmount.CancelEdit(); }
private void ClearForm() { ASPxEdit.ClearEditorsInContainer(formlayoutCodeRuleDefinitionEditingForm); //cbCodeRuleDataType.SelectedIndex = 0; txtStringValue.IsValid = true; cbCodeRuleDataType.IsValid = true; cbCodeRuleDataFormat.IsValid = true; spinStep.IsValid = true; spinBeginNumberValue.IsValid = true; }
private void ClearForm() { //clear all fields inside form layout ASPxEdit.ClearEditorsInContainer(frmBuyingService); pagBuyingService.ActiveTabIndex = 0; cbRowStatus.SelectedIndex = 0; HtmlEditorDescription.Html = String.Empty; txtCode.IsValid = true; txtName.IsValid = true; }
public void ClearForm() { //clear all fields inside form layout ASPxEdit.ClearEditorsInContainer(frmlInfoGeneral); this.pagWarehouseEdit.ActiveTabIndex = 0; this.cbRowStatus.SelectedIndex = 0; //HtmlEditorDescription.Html = String.Empty; txtCode.IsValid = true; txtName.IsValid = true; txtName.Text = ""; PrivateSession.ClearInstance(); }
protected void btnSubmit_Click(object sender, EventArgs e) { Alert alert = new Alert(); try { if (Session["BASTFileName"] != null && Session["BASTFileBytes"] != null) { UnloadingModel.UnloadingDetail item = new UnloadingModel.UnloadingDetail(); item.LO_ID = Convert.ToInt64(hf["LO_ID"]); item.UnloadingDate = deUnloading.Date == DateTime.MinValue ? Convert.ToDateTime("1/1/1900") : deUnloading.Date; item.MeasurementMethods = txtMetodePengukuran.Text; item.EIJKBautHeight = Convert.ToInt64(seTinggiEijkBoot.Value ?? 0); item.EIJKBautActual = Convert.ToInt64(seAktualEijkBoot.Value ?? 0); item.SensitivityVolume = Convert.ToInt64(seVolumeKepekaan.Value ?? 0); item.ReceiptVolume = Convert.ToInt64(seVolumePenerimaan.Value ?? 0); item.UnloadingNote = txtUnloadingNote.Text; item.BASTNumber = txtNoBAST.Text; item.CreationBy = UserProfile.Username; item.BASTFileName = Convert.ToString(Session["BASTFileName"]); item.BASTFileBytes = (byte[])Session["BASTFileBytes"]; Session["BASTFileName"] = null; Session["BASTFileBytes"] = null; string res = UnloadingEntity.SubmitUnloading(item); if (res.ToLower().Contains("success")) { alert.MessageString("success", res, Page, GetType()); } else { alert.MessageString("error", res, Page, GetType()); } ASPxEdit.ClearEditorsInContainer(Page, true); cpUnloadingDetail.ClientVisible = false; cpUnloadingList.ClientVisible = true; LoadInitUnloadingList(); } else { alert.MessageString("warning", "Upload BAST is required.", Page, GetType()); } } catch (Exception ex) { alert.MessageString("error", ex.Message, Page, GetType()); } }
public void ClearForm() { //clear all fields inside form layout ASPxEdit.ClearEditorsInContainer(frmlInfoGeneral); pagWarehouseUnitEdit.ActiveTabIndex = 0; this.cbRowStatus.SelectedIndex = 0; //HtmlEditorDescription.Html = String.Empty; /////2013-09-21 ERP-580 Khoa.Truong INS START //txtCode.IsValid = true; txtName.IsValid = true; /////2013-09-21 ERP-580 Khoa.Truong INS END }
public void ClearForm() { //clear all fields inside form layout ASPxEdit.ClearEditorsInContainer(frmlActiveElement); pagManufacturerGroupEdit.ActiveTabIndex = 0; cbRowStatus.SelectedIndex = 0; HtmlEditorDescription.Html = String.Empty; /////2013-09-20 ERP-572 Khoa.Truong INS START this.txtCode.IsValid = true; this.txtName.IsValid = true; this.txtComponent.IsValid = true; this.txtFunction.IsValid = true; /////2013-09-20 ERP-572 Khoa.Truong INS END }
protected void ASPxGridView1_CustomCallback(object sender, ASPxGridViewCustomCallbackEventArgs e) { if (e.Parameters == "Cancel") { ASPxEdit.ClearEditorsInContainer(ASPxGridView1, "DateGroup"); ASPxGridView1.DataBind(); } else { if (ASPxEdit.ValidateEditorsInContainer(ASPxGridView1)) { //Your update operations here } } }
protected void btnSubmit_Click(object sender, EventArgs e) { Alert alert = new Alert(); try { LOModel.LO item = new LOModel.LO(); item.SPP_Items_ID = Convert.ToInt64(hf["itemID"]); item.Transporter_ID = Convert.ToInt32(cmbTransporter.Value); item.Vehicle_ID = Convert.ToInt32(cmbVehicleNumber.Value); item.Driver_ID = Convert.ToInt32(cmbDriver.Value); item.DeliveryNote = txtDONote.Text; item.NoLO = "0"; //txtLO.Text; item.LODate = Convert.ToDateTime("1900/01/01"); // deLO.Date; item.NoDO = txtDO.Text; item.DODate = deDO.Date == DateTime.MinValue ? Convert.ToDateTime("1/1/1900") : deDO.Date; item.CustomerPO_Number = txtPO.Text; item.CustomerDate = dePO.Date == DateTime.MinValue ? Convert.ToDateTime("1/1/1900") : dePO.Date; item.OrderNumber = txtOrder.Text; item.OrderDate = deOrder.Date == DateTime.MinValue ? Convert.ToDateTime("1/1/1900") : deOrder.Date; item.CreationBy = UserProfile.Username; string res = LOEntity.SubmitLO(item); if (res.ToLower().Contains("success")) { alert.MessageString("success", res, Page, GetType()); } else { alert.MessageString("error", res, Page, GetType()); } ASPxEdit.ClearEditorsInContainer(Page, true); cpLODetail.ClientVisible = false; cpLOList.ClientVisible = true; LoadInitLOList(); //ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RefreshLOlist", "cpLOList.PerformCallback();", true); } catch (Exception ex) { alert.MessageString("error", ex.Message, Page, GetType()); } }
protected void SubmitButton_Click(object sender, EventArgs e) { ValidateInputData(); List <UploadedFileInfo> resultFileInfos = new List <UploadedFileInfo>(); string description = cboDataUploadType.Text.ToString(); //DescriptionTextBox.Text; bool allFilesExist = true; if (UploadedFilesStorage == null) { UploadedFilesTokenBox.Tokens = new TokenCollection(); } foreach (string fileName in UploadedFilesTokenBox.Tokens) { UploadedFileInfo demoFileInfo = UploadControlHelper.GetDemoFileInfo(SubmissionID, fileName); FileInfo fileInfo = new FileInfo(demoFileInfo.FilePath); if (fileInfo.Exists) { demoFileInfo.FileSize = FormatSize(fileInfo.Length); resultFileInfos.Add(demoFileInfo); } else { allFilesExist = false; } } if (allFilesExist && resultFileInfos.Count > 0) { ProcessSubmit(description, resultFileInfos); UploadControlHelper.RemoveUploadedFilesStorage(SubmissionID); ASPxEdit.ClearEditorsInContainer(FormLayout, true); } else { UploadedFilesTokenBox.ErrorText = "Submit failed because files have been removed from the server due to the 5 minute timeout."; UploadedFilesTokenBox.IsValid = false; } }
public void ClearForm() { //clear all fields inside form layout ASPxEdit.ClearEditorsInContainer(frmlInfoGeneral); pagDeviceEdit.ActiveTabIndex = 0; this.cbRowStatus.SelectedIndex = 0; HtmlEditorDescription.Html = String.Empty; //CategoryEntityList = null; //SupplierEntityList = null; this.grdataBuyingToolCategory.DataSource = null; this.grdataBuyingToolCategory.DataBind(); this.grdataSupplier.DataSource = null; this.grdataSupplier.DataBind(); //ToolUnitConstruction = new XPCollection<ViewToolUnitConstruction>(session); //ToolUnitConstruction.Criteria = new BinaryOperator("ToolId", toolKey, BinaryOperatorType.Equal); //treelstToolUnits.DataSource = ToolUnitConstruction; treelstToolUnits.DataBind(); //ToolUnitConstruction = ToolUnitConstruction; txtCode.IsValid = true; txtName.IsValid = true; cbRowStatus.IsValid = true; }
private void ClearForm() { ASPxEdit.ClearEditorsInContainer(formlayoutGeneralInfo); txtCustomFieldName.IsValid = true; cbbCustomFieldType.IsValid = true; }
protected void btnAgain_Click(object sender, EventArgs e) { FormPanel.Visible = true; SuccessPanel.Visible = false; ASPxEdit.ClearEditorsInContainer(FormPanel); }
protected void SubmitButton_Click(object sender, EventArgs e) { ValidateInputData(); List <UploadedFileInfo> resultFileInfos = new List <UploadedFileInfo>(); DataTable data = null; bool allFilesExist = true; if (UploadedFilesStorage == null) { UploadedFilesTokenBox.Tokens = new TokenCollection(); } if (UploadedFilesTokenBox.Tokens.Count > 0) { foreach (var UploadedFile in UploadedFilesTokenBox.Tokens) { UploadedFileInfo demoFileInfo = UploadControlHelper.GetDemoFileInfo(SubmissionID, UploadedFile); FileInfo fileInfo = new FileInfo(demoFileInfo.FilePath); if (fileInfo.Exists) { demoFileInfo.FileSize = Utils.FormatSize(fileInfo.Length); resultFileInfos.Add(demoFileInfo); var excel = new ExcelPackage(new FileInfo(demoFileInfo.FilePath)); if (data == null) { data = Utils.ToDataTable(excel); } else { data.Merge(Utils.ToDataTable(excel)); } } } if (resultFileInfos.Count() > 0) { //List<string> errors = Utils.ValidateExcelData(data); //if (errors.Count == 0) //{ //feed list to sp int columnscount = data.Columns.Count; if (columnscount == 13) { data.Columns.Add("IsDataUploaded", typeof(Boolean)); var AssessmentData = rtm_services.UploadAssessmentExcelData(data, true); Session["UploadedData"] = AssessmentData; gvAssesmentUpload.DataSource = AssessmentData; gvAssesmentUpload.DataBind(); gvAssesmentUpload.Visible = true; } else { data.Columns.Add("IsDataDuplicate", typeof(Boolean)); var dupData = rtm_services.UploadAssessmentExcelData(data); Session["UploadedData"] = dupData; gvAssesmentUpload.DataSource = dupData; gvAssesmentUpload.DataBind(); gvAssesmentUpload.Visible = true; } SubmitButton.Enabled = true; //} //else //{ // gvAssesmentUpload.DataSource = errors; // gvAssesmentUpload.DataBind(); // gvAssesmentUpload.Visible = true; //} } else { allFilesExist = false; } } if (allFilesExist && resultFileInfos.Count > 0) { UploadControlHelper.RemoveUploadedFilesStorage(SubmissionID); ASPxEdit.ClearEditorsInContainer(FormLayout, true); } else { UploadedFilesTokenBox.ErrorText = "Submit failed."; UploadedFilesTokenBox.IsValid = false; } void ValidateInputData() { bool isInvalid = UploadedFilesTokenBox.Tokens.Count == 0; if (isInvalid) { throw new Exception("Invalid input data"); } } }
public static void ClearTable(this HtmlTable table) { ASPxEdit.ClearEditorsInContainer(table); }
private void ClearForm() { ASPxEdit.ClearEditorsInContainer(cpnReceiptVoucherEditingForm); ClearFormValidation(); }