public ActionResult Add(RentOrder rentOrder) { return(Json(rentOrderOper.Add(rentOrder, delegate(object sender, ISession session) { //判断是否存在领用主单号 IsExistsCode(session, rentOrder); } ))); }
public ActionResult Add(CheckStock checkStock) { return(Json(checkStockOper.Add(checkStock, delegate(object sender, ISession session) { //判断是否存在盘点主单号 IsExistsCode(session, checkStock); } ))); }
public ActionResult Add(SellOrder sellOrder) { return(Json(sellOrderOper.Add(sellOrder, delegate(object sender, ISession session) { //判断是否存在销售主单号 IsExistsCode(session, sellOrder); } ))); }
public ActionResult Add(GoodsType goodsType) { return(Json(goodsTypeOper.Add(goodsType, delegate(object sender, ISession session) { //判断是否存在商品资料Code IsExistsCode(session, goodsType); } ))); }
public ActionResult Add(PurOrderDetail purOrderDetail) { return(Json(purOrderDetailOper.Add(purOrderDetail, delegate(object sender, ISession session) { //判断是否存在采购明细单号 IsExistsCode(session, purOrderDetail); } ))); }
public ActionResult Add(SellPriceInfo sellPriceInfo) { return(Json(sellPriceInfoOper.Add(sellPriceInfo, delegate(object sender, ISession session) { //判断是否存在销售价格管理(商品资料子表) IsExists(session, sellPriceInfo); } ))); }
public ActionResult Add(CheckStockDetail checkStockDetail) { return(Json(checkStockDetailOper.Add(checkStockDetail, delegate(object sender, ISession session) { //判断是否存在盘点明细单号 IsExistsCode(session, checkStockDetail); } ))); }
public ActionResult Add(Unit unit) { return(Json(unitOper.Add(unit, delegate(object sender, ISession session) { //判断是否存在部门Code IsExistsName(session, unit); } ))); }
public ActionResult Add(RetOrderDetail retOrderDetail) { return(Json(retOrderDetailOper.Add(retOrderDetail, delegate(object sender, ISession session) { //判断是否存在退货明细单号 IsExistsCode(session, retOrderDetail); } ))); }
public ActionResult Add(PurOrder purOrder) { return(Json(purOrderOper.Add(purOrder, delegate(object sender, ISession session) { //判断是否存在采购主单号 IsExistsCode(session, purOrder); } ))); }
public ActionResult Add(ModFunc modFunc) { return(Json(modFuncOper.Add(modFunc, delegate(object sender, ISession session) { //判断是否存在模块功能 IsExists(session, modFunc); } ))); }
public ActionResult Add(SellOrderDetail sellOrderDetail) { return(Json(sellOrderDetailOper.Add(sellOrderDetail, delegate(object sender, ISession session) { //判断是否存在销售明细单号 IsExistsCode(session, sellOrderDetail); } ))); }
public ActionResult Add(StockInit stockInit) { return(Json(stockInitOper.Add(stockInit, delegate(object sender, ISession session) { //判断是否存在库存数据 IsExists(session, stockInit); } ))); }
public ActionResult Add(StorageAlarm storageAlarm) { return(Json(storageAlarmOper.Add(storageAlarm, delegate(object sender, ISession session) { //判断是否存在库存数据 IsExists(session, storageAlarm); } ))); }
public ActionResult Add(Position position) { return(Json(positionOper.Add(position, delegate(object sender, ISession session) { //判断是否存在部门Code IsExistsCode(session, position); } ))); }
public ActionResult Add(Company company) { //根据地址码获取地址 company.Addr = PojoUtil.GetAddrForCode(HibernateOper, company.AddrCode); LocationUtil.Location loc = LocationUtil.GetLocation(company.Addr + company.Location); if (loc != null) { company.Lat = loc.lat; company.Lng = loc.lng; } return(Json(companyOper.Add(company))); }
public ActionResult Add(Garden garden) { //根据地址码获取地址 garden.Addr = PojoUtil.GetAddrForCode(HibernateOper, garden.AddrCode); LocationUtil.Location loc = LocationUtil.GetLocation(garden.Addr + garden.Location); if (loc != null) { garden.Lat = loc.lat; garden.Lng = loc.lng; } return(Json(gardenOper.Add(garden))); }
public ActionResult Add(GoodsInfo goodsInfo) { return(Json(goodsInfoOper.Add(goodsInfo, delegate(object sender, ISession session) { //判断是否存在商品资料Code IsExistsCode(session, goodsInfo); //判断是否存在商品资料BarCode IsExistsBarCode(session, goodsInfo); } ))); }
public ActionResult Upload() { IList <File> retVal = new List <File>(); string path = Server.MapPath("/") + @"Files\"; //文件上传,一次上传1M的数据,防止出现大文件无法上传 HttpFileCollectionBase files = Request.Files; for (int i = 0; i < files.Count; i++) { //保存上传的文件 File file = SaveHttpPostFile(files[i], path); //查找是否存在过相同MD5值的文件,如果是则不保存到数据库 IList <File> searchFiles = fileOper.Get( delegate(object sender, ICriteria criteria) { criteria.Add(Restrictions.Eq("Md5", file.Md5)); } ); if (searchFiles.Count > 0) { //删除上传的文件并把数据库相同文件信息返回 DelFile(file.RealPath); file = searchFiles[0]; } else { //保存文件到数据库 fileOper.Add(file); } retVal.Add(file); } return(Json(retVal)); }
public ActionResult Add(VendorInfo vendorInfo) { //根据地址码获取地址 vendorInfo.Addr = PojoUtil.GetAddrForCode(HibernateOper, vendorInfo.AddrCode); LocationUtil.Location loc = LocationUtil.GetLocation(vendorInfo.Addr + vendorInfo.Location); if (loc != null) { vendorInfo.Lat = loc.lat; vendorInfo.Lng = loc.lng; } return(Json(vendorInfoOper.Add(vendorInfo, delegate(object sender, ISession session) { //判断是否存在部门Code IsExistsCode(session, vendorInfo); } ))); }
public ActionResult Add(Employee employee) { //根据地址码获取地址 employee.Addr = PojoUtil.GetAddrForCode(HibernateOper, employee.AddrCode); LocationUtil.Location loc = LocationUtil.GetLocation(employee.Addr + employee.Location); if (loc != null) { employee.Lat = loc.lat; employee.Lng = loc.lng; } return(Json(employeeOper.Add(employee, delegate(object sender, ISession session) { //判断是否存在部门Code IsExistsCode(session, employee); } ))); }
public ActionResult Add(Storehouse storehouse) { //根据地址码获取地址 storehouse.Addr = PojoUtil.GetAddrForCode(HibernateOper, storehouse.AddrCode); LocationUtil.Location loc = LocationUtil.GetLocation(storehouse.Addr + storehouse.Location); if (loc != null) { storehouse.Lat = loc.lat; storehouse.Lng = loc.lng; } return(Json(storehouseOper.Add(storehouse, delegate(object sender, ISession session) { //判断是否存在库存Code IsExistsCode(session, storehouse); } ))); }
public ActionResult Add(Department department) { //根据地址码获取地址 department.Addr = PojoUtil.GetAddrForCode(HibernateOper, department.AddrCode); LocationUtil.Location loc = LocationUtil.GetLocation(department.Addr + department.Location); if (loc != null) { department.Lat = loc.lat; department.Lng = loc.lng; } return(Json(departmentOper.Add(department, delegate(object sender, ISession session) { //判断是否存在部门Code IsExistsCode(session, department); } ))); }
public ActionResult Add(Mod mod) { return(Json(modOper.Add(mod))); }
public ActionResult Add(Customer customer) { return(Json(customerOper.Add(customer))); }
public void Init2() { try { //给员工初始化 Employee e = new Employee(); e.Code = "999"; e.Name = "System"; e.Pwd = "123456"; e.Birthday = DateTime.Now; e.Entry = DateTime.Now; TbBaseOper<Employee> employeeOper = new TbBaseOper<Employee>(HibernateFactory.GetInstance(), typeof(Employee)); employeeOper.Add(e); TbBaseOper<EmpModFunc> emfOper = new TbBaseOper<EmpModFunc>(HibernateFactory.GetInstance(), typeof(EmpModFunc)); IList<ModFunc> funcs = modFuncOper.Get(); foreach (ModFunc mf in funcs) { EmpModFunc emf = new EmpModFunc(); emf.Emp = e; emf.ModFunc = mf; emf.FuncNames = "|Add|Update|Del|Get|"; emfOper.Add(emf); } TbBaseOper<EmpMod> emOper = new TbBaseOper<EmpMod>(HibernateFactory.GetInstance(), typeof(EmpMod)); IList<Mod> mods = modOper.Get(); foreach (Mod m in mods) { EmpMod em = new EmpMod(); em.Emp = e; em.Mod = m; emOper.Add(em); } } catch (Exception e) { System.Console.WriteLine(e.Message); } }
public ActionResult Add(EmpMod empMod) { return(Json(empModOper.Add(empMod))); }
public ActionResult AddWorkCodeType2(WorkCodeType2 workCodeType2) { return(Json(workCodeType2Oper.Add(workCodeType2))); }
public ActionResult Add(Photo photo) { return(Json(photoOper.Add(photo))); }
public ActionResult Add(WorkCodeType workCodeType) { return(Json(workCodeTypeOper.Add(workCodeType))); }
public ActionResult AddWorkCodeType1(WorkCodeType1 workCodeType1) { return(Json(workCodeType1Oper.Add(workCodeType1))); }