Beispiel #1
0
 public void BomSellSave(BomSellModel model)
 {
     new MongoDacHelper("bomsell").Save(model);
 }
Beispiel #2
0
        public JsonResult BomSellInsert(string catid, string bomId, string outId, DateTime date, int price, int qty, int totalPrice)
        {
            var result = true;
            try
            {
                CompanyModel company = new Dac_Company().CompanyInfoDetail(ObjectId.Parse(ConfigurationManager.AppSettings["COM"]));
                BomModel bom = new Dac_Bom().BomSelecOnetById(ObjectId.Parse(bomId));
                OutCompanyModel outcompany = new Dac_Bom().OutCompanySelecOnetById(ObjectId.Parse(outId));

                BomSellModel model = new BomSellModel();
                model.Indate = date;
                model.OutCompany = outcompany;
                model.Price = price;
                model.Qty = qty;
                model.TotalPrice = totalPrice;
                model.Bom = bom;
                model.Company = company;

                new Dac_Bom().BomSellSave(model);
            }
            catch (Exception ex)
            {
                result = false;
            }

            return Json(result);
        }