internal void Fill(ref DocInvoice_ShopA_Item m_DocInvoice_ShopA_Item)
 {
     throw new NotImplementedException();
 }
예제 #2
0
 internal void Fill(ref DocInvoice_ShopA_Item m_DocInvoice_ShopA_Item, decimal calculated_end_price)
 {
     this.nm_Price.Value = calculated_end_price;
     Fill(ref m_DocInvoice_ShopA_Item);
 }
예제 #3
0
        public static bool insert(string DocInvoice,DocInvoice_ShopA_Item m_DocInvoice_ShopA_Item, ref long DocInvoice_ShopA_Item_ID)
        {
            long Atom_ItemShopA_ID = -1;

            if (get(m_DocInvoice_ShopA_Item.m_Atom_ItemShopA, ref Atom_ItemShopA_ID))
            {
                string Err = null;
                string scond = null;
                string sval = null;
                string sql = null;
                List<SQL_Parameter> lpar = new List<SQL_Parameter>();
                m_DocInvoice_ShopA_Item.m_Atom_ItemShopA.ID.set(Atom_ItemShopA_ID);
                if (DocInvoice.Equals("DocInvoice"))
                {
                    m_DocInvoice_ShopA_Item.m_DocInvoice.ID.setsqlp(ref lpar, "DocInvoice_ID", ref scond, ref sval);
                    m_DocInvoice_ShopA_Item.m_Atom_ItemShopA.ID.setsqlp(ref lpar, "Atom_ItemShopA_ID", ref scond, ref sval);
                    m_DocInvoice_ShopA_Item.EndPriceWithDiscountAndTax.setsqlp(ref lpar, "EndPriceWithDiscountAndTax", ref scond, ref sval);
                    m_DocInvoice_ShopA_Item.PricePerUnit.setsqlp(ref lpar, "PricePerUnit", ref scond, ref sval);
                    m_DocInvoice_ShopA_Item.dQuantity.setsqlp(ref lpar, "dQuantity", ref scond, ref sval);
                    m_DocInvoice_ShopA_Item.Discount.setsqlp(ref lpar, "Discount", ref scond, ref sval);
                    m_DocInvoice_ShopA_Item.TAX.setsqlp(ref lpar, "TAX", ref scond, ref sval);
                    sql = "insert into DocInvoice_ShopA_Item (DocInvoice_ID,Atom_ItemShopA_ID,Discount,dQuantity,PricePerUnit,EndPriceWithDiscountAndTax,TAX) values ("
                                  + m_DocInvoice_ShopA_Item.m_DocInvoice.ID.value + ","
                                  + m_DocInvoice_ShopA_Item.m_Atom_ItemShopA.ID.value + ","
                                  + m_DocInvoice_ShopA_Item.Discount.value + ","
                                  + m_DocInvoice_ShopA_Item.dQuantity.value + ","
                                  + m_DocInvoice_ShopA_Item.PricePerUnit.value + ","
                                  + m_DocInvoice_ShopA_Item.EndPriceWithDiscountAndTax.value + ","
                                  + m_DocInvoice_ShopA_Item.TAX.value + ")";
                }
                else if (DocInvoice.Equals("DocProformaInvoice"))
                {
                    m_DocInvoice_ShopA_Item.m_DocInvoice.ID.setsqlp(ref lpar, "DocProformaInvoice_ID", ref scond, ref sval);
                    m_DocInvoice_ShopA_Item.m_Atom_ItemShopA.ID.setsqlp(ref lpar, "Atom_ItemShopA_ID", ref scond, ref sval);
                    m_DocInvoice_ShopA_Item.EndPriceWithDiscountAndTax.setsqlp(ref lpar, "EndPriceWithDiscountAndTax", ref scond, ref sval);
                    m_DocInvoice_ShopA_Item.PricePerUnit.setsqlp(ref lpar, "PricePerUnit", ref scond, ref sval);
                    m_DocInvoice_ShopA_Item.dQuantity.setsqlp(ref lpar, "dQuantity", ref scond, ref sval);
                    m_DocInvoice_ShopA_Item.Discount.setsqlp(ref lpar, "Discount", ref scond, ref sval);
                    m_DocInvoice_ShopA_Item.TAX.setsqlp(ref lpar, "TAX", ref scond, ref sval);
                    sql = "insert into DocProformaInvoice_ShopA_Item (DocProformaInvoice_ID,Atom_ItemShopA_ID,Discount,dQuantity,PricePerUnit,EndPriceWithDiscountAndTax,TAX) values ("
                                  + m_DocInvoice_ShopA_Item.m_DocInvoice.ID.value + ","
                                  + m_DocInvoice_ShopA_Item.m_Atom_ItemShopA.ID.value + ","
                                  + m_DocInvoice_ShopA_Item.Discount.value + ","
                                  + m_DocInvoice_ShopA_Item.dQuantity.value + ","
                                  + m_DocInvoice_ShopA_Item.PricePerUnit.value + ","
                                  + m_DocInvoice_ShopA_Item.EndPriceWithDiscountAndTax.value + ","
                                  + m_DocInvoice_ShopA_Item.TAX.value + ")";
                }
                else
                {
                    LogFile.Error.Show("ERROR:ShopA_dbfunc:dbfunc:get(Atom_ItemShopA m_Atom_ItemShopA, ref long atom_ItemShopA_ID) DocInvoice=" +DocInvoice+ " not implemented.");
                    return false;
                }
                object oret = null;
                if (DBSync.DBSync.ExecuteNonQuerySQLReturnID(sql, lpar, ref DocInvoice_ShopA_Item_ID, ref oret, ref Err, "DocInvoice_ShopA_Item"))
                {
                    return true;
                }
                else
                {
                    LogFile.Error.Show("ERROR:ShopA_dbfunc:dbfunc:get(Atom_ItemShopA m_Atom_ItemShopA, ref long atom_ItemShopA_ID) sql=" + sql + "\r\nErr=" + Err);
                    return false;
                }
            }
            return false;
        }
예제 #4
0
 internal void Fill(ref DocInvoice_ShopA_Item m_DocInvoice_ShopA_Item)
 {
     m_DocInvoice_ShopA_Item.EndPriceWithDiscountAndTax.set(nm_Price.Value);
 }