Exemple #1
0
        protected void lkbSubmitItems_Click(object sender, EventArgs e)
        {
            try
            {
                var invoiceData = invoice.GetInvoice(Convert.ToInt64(ddl_InvoiceID.SelectedValue.ToString()));
                invoiceData.GST_TRN_INVOICE_DATA = GetGVData();
                if (invoiceData.GST_TRN_INVOICE_DATA.Count() > 0)
                {
                    EnumConstants.NoteType invAction = (EnumConstants.NoteType)Enum.Parse(typeof(EnumConstants.NoteType), ddlNoteType.SelectedValue.ToString());

                    noteItem.NoteType    = (byte)invAction;
                    noteItem.Description = txtDescription.Text.Trim();
                    bool isSave = noteItem.SaveNote(invoiceData);
                    uc_sucess.SuccessMessage = "Data Submitted Successfully.";
                    uc_sucess.Visible        = true;
                    ClearField();
                    //Message
                    BindInvoice();
                }
                else
                {
                    uc_sucess.ErrorMessage = "Please Enter Valid Data.";
                    uc_sucess.VisibleError = true;
                }
            }
            catch (Exception ex)
            {
                cls_ErrorLog ob = new cls_ErrorLog();
                cls_ErrorLog.LogError(ex, Common.LoggedInUserID());
                this.uc_sucess.ErrorMessage = ex.Message;
                uc_sucess.VisibleError      = true;
            }
        }
Exemple #2
0
        public static string CreditColor(object noteType)
        {
            string NoteColorBox;// = Convert.ToInt32(invoicID);

            EnumConstants.NoteType NoteType = (EnumConstants.NoteType)Enum.Parse(typeof(EnumConstants.NoteType), noteType != null ? noteType.ToString() : "-1");
            switch (NoteType)
            {
            case EnumConstants.NoteType.Credit:
                NoteColorBox = "<span class='label label-success'>" + NoteType.ToString() + "</span>";

                break;

            case EnumConstants.NoteType.Debit:
                NoteColorBox = "<span class='label label-primary'>" + NoteType.ToString() + "</span>";
                break;
            //case EnumConstants.NoteType.Refund:
            //    NoteColorBox = "<span class='label label-danger'>" + invAudit.ToDescription() + (!string.IsNullOrEmpty(invoiceAction) ? (" - " + invAction) : "") + "</span>";
            //    break;


            default:
                NoteColorBox = "<span class='label label-danger'>-</span>";;
                break;
            }

            return(NoteColorBox);
        }