Esempio n. 1
0
        public void List_Option(ListOption pAction)
        {
            fAction = pAction;

            switch (fAction)
            {
            case ListOption.notactive:

                if (rdo_notactive.Checked == true)
                {
                    LoadData(CQuotation_exten.Notactive(new DAL()));
                }
                else
                {
                    LoadData(CQuotation_exten.Showall(new DAL()));
                }

                break;

            case ListOption.Search:
                LoadData(CQuotation_exten.Searchby(txt_no.Text, txt_date.Text, txt_Todate.Text, txt_party.Text, new DAL()));
                break;

            default:
                LoadData(CQuotation_exten.Showall(new DAL()));
                break;
            }
        }
Esempio n. 2
0
        private void Btn_edit_Click(object sender, EventArgs e)
        {
            string pkValue = GetSelectedPkValue();

            if (CQuotation_exten.LockStatus(pkValue) == false)
            {
                BuildForm();
                if (pkValue != null)
                {
                    fquotation.SetAction(BtnEvent.Edit, pkValue);
                    fquotation.SetFocus();
                }
            }
        }
Esempio n. 3
0
 private void LoadData(Quotation obj)
 {
     vId = obj.Quotation_id;
     txt_quotation_no.Text   = obj.Quotation_no.ToString();
     txt_quotation_date.Text = obj.Quotation_date;
     txt_party_id.Text       = obj.Party_id;
     //txt_total_qty.Text = obj.Total_qty.ToString();
     //txt_total_taxable_amount.Text = obj.Total_taxable_amount;
     //txt_gsttotal.Text = obj.Gsttotal.ToString();
     txt_ledger_id.Text  = obj.Ledger_id;
     txt_additional.Text = obj.Additional.ToString();
     txt_grandtotal.Text = obj.Grandtotal.ToString();
     txt_balance.Text    = CQuotation_exten.GetBalance(CParty_exten.GetId_Name(txt_party_id.Text)).ToString();
     txt_notes.Text      = obj.Notes;
     Core.Stative        = obj.Active_id;
     Setactives();
 }
Esempio n. 4
0
        public void SetAction(BtnEvent pAction, string pPkValue)
        {
            fAction = pAction;

            switch (fAction)
            {
            case BtnEvent.Open:
                btn_save.Text = "&CLOSE";
                obj           = CQuotation_exten.PKId(pPkValue, new DAL());
                list          = CQuotationitems_exten.FKNo(pPkValue, new DAL());

                this.EnableControls(false);
                break;

            case BtnEvent.New:
                btn_save.Text = "&SAVE";
                obj           = CQuotation.GetNew;
                list          = CQuotationitems.GetNew;
                this.EnableControls(true);
                break;

            case BtnEvent.Edit:
                btn_save.Text = "&UPDATE";
                obj           = CQuotation_exten.PKId(pPkValue, new DAL());
                list          = CQuotationitems_exten.FKNo(pPkValue, new DAL());
                this.EnableControls(true);
                break;

            case BtnEvent.Delete:
                btn_save.Text = "CONFIRM\r\n&DELETE";
                obj           = CQuotation_exten.PKId(pPkValue, new DAL());
                list          = CQuotationitems_exten.FKNo(pPkValue, new DAL());
                this.EnableControls(false);
                break;

            case BtnEvent.Print:
                btn_save.Text = "&PRINT";
                obj           = CQuotation_exten.PKId(pPkValue, new DAL());
                list          = CQuotationitems_exten.FKNo(pPkValue, new DAL());
                this.EnableControls(false);
                break;
            }

            LoadData(obj);
            Loaditems(list);
        }
Esempio n. 5
0
 private void Txt_party_TextChanged(object sender, EventArgs e)
 {
     txt_balance.Text = CQuotation_exten.GetBalance(CParty_exten.GetId_Name(txt_party_id.Text)).ToString();
 }
Esempio n. 6
0
 void Txt_party_LookupUpdate(object sender, EventArgs e)
 {
     txt_party.LookupList = CQuotation_exten.LookupParty(new DAL());
 }
Esempio n. 7
0
 void Txt_no_LookupUpdate(object sender, EventArgs e)
 {
     txt_no.LookupList = CQuotation_exten.LookupNo(new DAL());
 }
Esempio n. 8
0
        private static Print_QuotationList GetData(string p_id)
        {
            Quotation quotation = CQuotation_exten.PKId(p_id, new DAL());

            Print_QuotationList list = new Print_QuotationList();

            Print_QuotationRow row = new Print_QuotationRow();

            Company obj = CCompany_exten.PKId(Current.Company_id);

            row.COMPANY_NAME = obj.Display_name.ToUpper();
            row.ADDRESS1     = obj.Street1 + " , " + obj.Street2;
            row.ADDRESS2     = obj.City_id + " - " + obj.Pincode_id + " , " + obj.State_id + ". Code -33,    Email : " + obj.Email;
            row.COMPANY_TIN  = " GSTIN : " + obj.Gstin + "";// ,    Cell :    " + obj.Cell1 + " ";

            row.QUOTATION_ID   = p_id;
            row.QUOTATION_NO   = "NO    : " + quotation.Quotation_no.ToString();
            row.QUOTATION_DATE = "DATE  : " + ConvertTO.Date2S(quotation.Quotation_date);

            row.PARTY_NAME = quotation.Party_id;

            Party _party_list = CParty_exten.SearchName(quotation.Party_id, new DAL());

            if (_party_list.Party_name != null)
            {
                row.STREET1 = _party_list.Street_1 + ", " + _party_list.Street_2;
                row.STREET2 = "";
                row.CITY    = _party_list.City_id + " - " + _party_list.Pincode_id + " ,";
                //row.STATE = _party_list.State_id + " - " + CState_exten.GetStateCode(_party_list.State_id);
                row.COUNTRY = _party_list.Country_id;
                row.PINCODE = "";

                if (_party_list.Gstin.Trim().Length != 0)
                {
                    row.GSTIN += "GSTIN No : " + _party_list.Gstin;
                }
            }

            row.TOTAL_QTY = ConvertTO.DecimalToS(quotation.Total_qty.ToString());

            row.TAXABLE_VALUE = ConvertTO.Decimal2d(quotation.Total_taxable_amount.ToString());


            List <Quotationitems> klist = CQuotationitems_exten.FKId(p_id, new DAL());

            row.TOTAL_SUB = (Global.ToDecimal(row.TAXABLE_VALUE).ToString());

            if (quotation.Ledger_id != null)
            {
                if (quotation.Ledger_id.Trim() != "")
                {
                    row.LEDGER = "Add TAX Invoice " + quotation.Ledger_id;
                }
                else
                {
                    row.LEDGER = "";
                }
            }

            row.ADDITIONAL      = quotation.Additional.ToString();
            row.OUTSTANDING     = "Total Outstanding Amount : " + CQuotation_exten.GetBalance(CParty_exten.GetId_Name(quotation.Party_id));
            row.GRANDTOTAL      = quotation.Grandtotal.ToString();
            row.AMOUNT_IN_WORDS = "Rupees   : " + Global.AmountInWords(Convert.ToDecimal(quotation.Grandtotal));

            list.Add(row);

            return(list);
        }