//NEW protected void btnAddNew_Click(object sender, EventArgs e) { int intCounter; intCounter = CommonCodes.getCount(CommonCodes.gUserDatafile); txtUserID.Text = Convert.ToString(intCounter); txtStatus.Text = CommonCodes.STATUS_DRAFT; txtUsername.Text = string.Empty; txtFirstname.Text = string.Empty; txtLastname.Text = string.Empty; txtDepartment.Text = string.Empty; txtEmail.Text = string.Empty; displayEditForm("New user", false, true, true, true, false); }
protected void btnAddNew_Click(object sender, EventArgs e) { int intCounter; intCounter = CommonCodes.getCount(CommonCodes.gVATCodeDatafile); txtID.Text = Convert.ToString(intCounter); txtStatus.Text = CommonCodes.STATUS_DRAFT; txtVATCode.Text = string.Empty; txtDescription.Text = string.Empty; txtVATPercentage.Text = string.Empty; rbInput.Checked = false; rbOutput.Checked = false; displayEditForm("New tax code", false, true, true, true, false); }
//NEW protected void btnAddNew_Click(object sender, EventArgs e) { int intCounter; intCounter = CommonCodes.getCount(CommonCodes.gCompanyDatafile); txtCompanyID.Text = Convert.ToString(intCounter); selectedApprovers = new List <string>(); selectedDepartments = new List <string>(); selectedApprovers.Add(""); selectedDepartments.Add(""); txtCompanyCode.Text = string.Empty; txtCompanyName.Text = string.Empty; txtAddress.Text = string.Empty; //txtHomeCurrency.Text = string.Empty; ddlCurrency.Text = string.Empty; //chkApprovers.ClearSelection(); chkApprovers.Items.Clear(); //chkDepartments.ClearSelection(); chkDepartments.Items.Clear(); displayEditForm("New company", false, true, true, true, false); }
//ACTION-BUTTONS //NEW protected void btnAddNew_Click(object sender, EventArgs e) { try { CommonCodes.gJEDoc = new JEDoc(); int intCounter = CommonCodes.getCount(CommonCodes.gJEDocDatafile); //CommonCodes.gJEDoc.processinghistory.Clear(); //CommonCodes.gJEDoc.rows.Clear(); CommonCodes.gJEDoc.id = Convert.ToString(intCounter); CommonCodes.gJEDoc.author = CommonCodes.gUsername; addNewStatus(CommonCodes.STATUS_DRAFT, "New JE document"); //populating fields txtID.Text = Convert.ToString(intCounter); ddlPeriod.Text = string.Empty; ddlType.Text = string.Empty; txtDocumentNumber.Text = string.Empty; txtDate.Text = string.Empty; txtAuthor.Text = CommonCodes.gUsername; ddlApprover.Text = string.Empty; ddlApprover.Items.Clear(); txtCompanyCode.Text = string.Empty; txtCompanyName.Text = string.Empty; ddlCompany.Text = string.Empty; ddlDepartment.Text = string.Empty; txtHomeCurrency.Text = string.Empty; ddlDepartment.Text = string.Empty; ddlDepartment.Items.Clear(); txtHeadertext.Text = string.Empty; txtHomeCurrency.Text = string.Empty; ddlCurrency.Text = string.Empty; txtCurrencyRate.Text = string.Empty; txtInformation.Text = string.Empty; ltProcessingHistoryAll.Text = ""; lblDebetTotal.Text = string.Empty; lblCreditTotal.Text = string.Empty; lblDifference.Text = string.Empty; ltDataRows.Text = ""; //display processing history if (CommonCodes.gJEDoc.processinghistory != null) { foreach (JEDocStatus status in CommonCodes.gJEDoc.processinghistory) { ltProcessingHistoryAll.Text += string.Format("<tr class='listRow'><td>{0}</td><td>{1}</td><td>{2}</td><td>{3}</td><td>{4}</td></tr>", status.id, status.status, status.username, status.date, status.message); } } displayEditForm("New JE document", false, true, true, true, false); } catch (Exception ex) { CommonCodes.gLog.logError(strPagetitle + ", creating new JE document: ", ex); mpMessage.Text = "<br />" + ex.Message; } }