public void BomCategorySave(BomCategoryModel bomCategory) { new MongoDacHelper("bomCategory").Save<BomCategoryModel>(bomCategory); }
public JsonResult Insert(string name = "") { bool result = true; try { CompanyModel company = new Dac_Company().CompanyInfoDetail(ObjectId.Parse(ConfigurationManager.AppSettings["COM"])); BomCategoryModel model = new BomCategoryModel(); model.Company = company; model.BomCategoryName = name; new Dac_Bom().BomCategorySave(model); } catch (Exception ex) { result = false; } return Json(result); }