コード例 #1
0
 public static bool LockStatus(string pkValue)
 {
     if (pkValue != null)
     {
         Quotation obj = PKId(pkValue, new DAL());
         if (obj.Locked == Core.Unlocked)
         {
             return(false);
         }
     }
     return(true);
 }
コード例 #2
0
ファイル: VQuotation.cs プロジェクト: CODEXSUN/codexdotnet
 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();
 }
コード例 #3
0
ファイル: VQuotation.cs プロジェクト: CODEXSUN/codexdotnet
        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);
        }
コード例 #4
0
        public static void Insert(Quotation v, DAL dalsession)
        {
            string q = " INSERT INTO " + QUOTATION.QUOTATION_TBL + " ( ";

            q += " " + QUOTATION.UNIQUENO + " \r\n ";
            q += "," + QUOTATION.COMPANY_ID + " \r\n ";
            q += "," + QUOTATION.ACY_ID + " \r\n ";
            q += "," + QUOTATION.ORDER_ID + " \r\n ";
            q += "," + QUOTATION.QUOTATION_NO + " \r\n ";
            q += "," + QUOTATION.QUOTATION_DATE + " \r\n ";
            q += "," + QUOTATION.PARTY_ID + " \r\n ";
            q += "," + QUOTATION.TOTAL_QTY + " \r\n ";
            q += "," + QUOTATION.TOTAL_TAXABLE_AMOUNT + " \r\n ";
            q += "," + QUOTATION.LEDGER_ID + " \r\n ";
            q += "," + QUOTATION.ADDITIONAL + " \r\n ";
            q += "," + QUOTATION.ROUNDS + " \r\n ";
            q += "," + QUOTATION.GRANDTOTAL + " \r\n ";
            q += "," + QUOTATION.REFERED_AMT + " \r\n ";
            q += "," + QUOTATION.LOCKED + " \r\n ";
            q += "," + QUOTATION.NOTES + " \r\n ";
            q += "," + QUOTATION.ACTIVE_ID + " \r\n ";
            q += "," + QUOTATION.USER_ID + " \r\n ";
            q += " ) VALUES ( ";
            q += "  @" + QUOTATION.UNIQUENO + "@ \r\n ";
            q += ", @" + QUOTATION.COMPANY_ID + "@ \r\n ";
            q += ", @" + QUOTATION.ACY_ID + "@ \r\n ";
            q += ", @" + QUOTATION.ORDER_ID + "@ \r\n ";
            q += ", @" + QUOTATION.QUOTATION_NO + "@ \r\n ";
            q += ", @" + QUOTATION.QUOTATION_DATE + "@ \r\n ";
            q += ", @" + QUOTATION.PARTY_ID + "@ \r\n ";
            q += ", @" + QUOTATION.TOTAL_QTY + "@ \r\n ";
            q += ", @" + QUOTATION.TOTAL_TAXABLE_AMOUNT + "@ \r\n ";
            q += ", @" + QUOTATION.LEDGER_ID + "@ \r\n ";
            q += ", @" + QUOTATION.ADDITIONAL + "@ \r\n ";
            q += ", @" + QUOTATION.ROUNDS + "@ \r\n ";
            q += ", @" + QUOTATION.GRANDTOTAL + "@ \r\n ";
            q += ", @" + QUOTATION.REFERED_AMT + "@ \r\n ";
            q += ", @" + QUOTATION.LOCKED + "@ \r\n ";
            q += ", @" + QUOTATION.NOTES + "@ \r\n ";
            q += ", @" + QUOTATION.ACTIVE_ID + "@ \r\n ";
            q += ", @" + QUOTATION.USER_ID + "@ \r\n ";
            q += " ) \r\n ";
            q  = AttachParams(q, v);
            dalsession.Execute(q);
        }
コード例 #5
0
 private static string AttachParams(string q, Quotation v)
 {
     q = q.Replace("@" + QUOTATION.QUOTATION_ID + "@", "" + ConvertTO.SqlString(v.Quotation_id) + "");
     q = q.Replace("@" + QUOTATION.UNIQUENO + "@", "" + ConvertTO.SqlString(v.Uniqueno) + "");
     q = q.Replace("@" + QUOTATION.COMPANY_ID + "@", "" + ConvertTO.SqlString(v.Company_id) + "");
     q = q.Replace("@" + QUOTATION.ACY_ID + "@", "" + ConvertTO.SqlString(v.Acy_id) + "");
     q = q.Replace("@" + QUOTATION.ORDER_ID + "@", "" + ConvertTO.SqlString(v.Order_id) + "");
     q = q.Replace("@" + QUOTATION.QUOTATION_NO + "@", "" + ConvertTO.SqlString(v.Quotation_no) + "");
     q = q.Replace("@" + QUOTATION.QUOTATION_DATE + "@", "" + ConvertTO.SqlDate(v.Quotation_date) + "");
     q = q.Replace("@" + QUOTATION.PARTY_ID + "@", "" + ConvertTO.SqlString(v.Party_id) + "");
     q = q.Replace("@" + QUOTATION.TOTAL_QTY + "@", "" + ConvertTO.SqlDecimal(v.Total_qty) + "");
     q = q.Replace("@" + QUOTATION.TOTAL_TAXABLE_AMOUNT + "@", "" + ConvertTO.SqlDecimal(v.Total_taxable_amount) + "");
     q = q.Replace("@" + QUOTATION.LEDGER_ID + "@", "" + ConvertTO.SqlString(v.Ledger_id) + "");
     q = q.Replace("@" + QUOTATION.ADDITIONAL + "@", "" + ConvertTO.SqlDecimal(v.Additional) + "");
     q = q.Replace("@" + QUOTATION.ROUNDS + "@", "" + ConvertTO.SqlDecimal(v.Rounds) + "");
     q = q.Replace("@" + QUOTATION.GRANDTOTAL + "@", "" + ConvertTO.SqlDecimal(v.Grandtotal) + "");
     q = q.Replace("@" + QUOTATION.REFERED_AMT + "@", "" + ConvertTO.SqlDecimal(v.Refered_amt) + "");
     q = q.Replace("@" + QUOTATION.LOCKED + "@", "" + ConvertTO.SqlString(v.Locked) + "");
     q = q.Replace("@" + QUOTATION.NOTES + "@", "" + ConvertTO.SqlString(v.Notes) + "");
     q = q.Replace("@" + QUOTATION.ACTIVE_ID + "@", "" + ConvertTO.SqlString(v.Active_id) + "");
     q = q.Replace("@" + QUOTATION.USER_ID + "@", "" + ConvertTO.SqlString(v.User_id) + "");
     return(q);
 }
コード例 #6
0
ファイル: P_Quotation.cs プロジェクト: CODEXSUN/codexdotnet
        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);
        }