private void AppendConcept() { LRSTransactionAct act = new LRSTransactionAct(this.transaction); act.RecordingActType = RecordingActType.Parse(int.Parse(Request.Form[cboRecordingActType.ClientID])); act.LawArticle = LRSLawArticle.Parse(int.Parse(Request.Form[cboLawArticle.ClientID])); //act.ReceiptNumber = cboReceipts.Value.Length != 0 ? cboReceipts.Value : txtRecordingActReceipt.Value; if (txtOperationValue.Value.Length != 0) { act.OperationValue = Money.Parse(Currency.Parse(int.Parse(cboOperationValueCurrency.Value)), decimal.Parse(txtOperationValue.Value)); } if (txtQuantity.Value.Length != 0) { act.Quantity = decimal.Parse(txtQuantity.Value); } act.Unit = Empiria.DataTypes.Unit.Parse(int.Parse(cboUnit.Value)); act.Notes = EmpiriaString.TrimAll(txtConceptNotes.Value); act.Save(); txtOperationValue.Value = String.Empty; txtQuantity.Value = String.Empty; cboUnit.Value = "-1"; txtConceptNotes.Value = String.Empty; onloadScript += "alert('El concepto se agregó correctamente.');"; }
private string GetLawArticlesStringArrayCommandHandler() { int recordingActTypeId = int.Parse(GetCommandParameter("recordingActTypeId", false, "0")); string items = String.Empty; if (recordingActTypeId != 0) { RecordingActType recordingActType = RecordingActType.Parse(recordingActTypeId); ObjectList<LRSLawArticle> list = recordingActType.GetFinancialLawArticles(); if (list.Count == 0) { list = LRSLawArticle.GetList(); } if (list.Count == 1) { return HtmlSelectContent.GetComboAjaxHtmlItem(list[0].Id.ToString(), list[0].Name); } else { return HtmlSelectContent.GetComboAjaxHtml(list, 0, "Id", "Name", "( Fundamento )"); } } else { return HtmlSelectContent.GetComboAjaxHtmlItem(String.Empty, "( Fundamento )"); } }
private void AppendConcept(int conceptTypeId, int lawArticleId) { LRSTransactionAct act = new LRSTransactionAct(this.transaction); act.RecordingActType = RecordingActType.Parse(conceptTypeId); act.LawArticle = LRSLawArticle.Parse(lawArticleId); act.Save(); }