public async Task <ActionResult> Create([Bind(Include = "PaymentMethod_ID,PaymentMethod_Name")] Payment_Method payment_Method) { if (ModelState.IsValid) { db.Payment_Method.Add(payment_Method); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(payment_Method)); }
public async Task <ActionResult> Create([Bind(Include = "DamageId,CategoryID,SubCategoryID,ProductID,LotNo,UnitId,Qty,Remarks,IsRemoved,IUSER,EUSER,IDAT,EDAT,BrId")] T_DAMAGE t_DAMAGE) { if (ModelState.IsValid) { db.T_DAMAGE.Add(t_DAMAGE); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(t_DAMAGE)); }
public async Task <ActionResult> Create([Bind(Include = "GrantID,BrId,UserID,MenuHeadID,SubMenuHeadID,PageID,CanView")] MenuPermissionWeb menuPermissionWeb) { if (ModelState.IsValid) { db.MenuPermissionWebs.Add(menuPermissionWeb); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(menuPermissionWeb)); }
public async Task <ActionResult> Create([Bind(Include = "DeptId,Dept_Name")] Department department) { if (ModelState.IsValid) { db.Departments.Add(department); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(department)); }
public async Task <ActionResult> Create([Bind(Include = "SlNo,InvoiceNo,SalesDate,SType,SubTotal,Vat,GrossAmount,Discount,DiscountTk,ReceiveAmount,DueCollection,CashPaid,CashChange,CustomerID,NetAmount,CustName,CustAddress,CustPhone,Description,IUSER,EUSER,IDAT,EDAT,BrId")] T_SALES_MST t_SALES_MST) { if (ModelState.IsValid) { db.T_SALES_MST.Add(t_SALES_MST); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(t_SALES_MST)); }
public async Task <ActionResult> Create([Bind(Include = "BankId,BankAccName,BankAccNo,OpenDate,Balance,BrId")] BankInfo bankInfo) { if (ModelState.IsValid) { db.BankInfoes.Add(bankInfo); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(bankInfo)); }
public async Task <ActionResult> Create([Bind(Include = "CustDueCollectionID,BrId,CustomerID,ReceiveAmount,CRDate,IsRemoved,IUser,EUser,IDate,EDate")] T_CustomerDueCollection t_CustomerDueCollection) { if (ModelState.IsValid) { db.T_CustomerDueCollection.Add(t_CustomerDueCollection); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(t_CustomerDueCollection)); }
public async Task <ActionResult> Create([Bind(Include = "SlNo,InvoiceNo,ProductID,LotNo,SalePrice,SaleQty,DisAomuntPerItems,ReturnQty,CostPrice,ReferenceInvoice,BrId")] T_SALES_DTL t_SALES_DTL) { if (ModelState.IsValid) { db.T_SALES_DTL.Add(t_SALES_DTL); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(t_SALES_DTL)); }
public async Task <ActionResult> Create([Bind(Include = "MenuHeadWebID,MenuHeadWebName,Priority,DivID")] MenuHeadWeb menuHeadWeb) { if (ModelState.IsValid) { db.MenuHeadWebs.Add(menuHeadWeb); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(menuHeadWeb)); }
public async Task <ActionResult> Create([Bind(Include = "Id,BrId,UserId,UserName,EmailID,Password,ConfirmPassword,CreateDate,UpdateDate,IsRemoved,UserFullName,PhoneNo")] User user) { if (ModelState.IsValid) { db.Users.Add(user); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(user)); }
public async Task <ActionResult> Create([Bind(Include = "CustomerID,DeptId,Name,Address,Phone,DueAdvance,IsRemoved,IUser,EUser,IDate,EDate,DueLimit,BrId")] T_Customer t_Customer) { if (ModelState.IsValid) { db.T_Customer.Add(t_Customer); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(t_Customer)); }
public async Task <ActionResult> Create([Bind(Include = "SupplierID,SupplierName,Address,PhoneNo,Balance,IsRemoved,IUser,EUser,IDate,EDate")] T_Supplier t_Supplier) { if (ModelState.IsValid) { db.T_Supplier.Add(t_Supplier); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(t_Supplier)); }
public async Task <ActionResult> Create([Bind(Include = "ExpId,ExpDescription,ExpAmount,ExpDate,ExpBy,Post,IUser,EUser,IDate,EDate,BrId")] T_Expenses t_Expenses) { if (ModelState.IsValid) { db.T_Expenses.Add(t_Expenses); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(t_Expenses)); }
public async Task <ActionResult> Create([Bind(Include = "SPId,SupplierId,TrnDate,ReceivedAmount,TrnType,Due,SPDescription,Post,IUser,EUser,IDate,EDate,BrId")] T_SupplierPayment t_SupplierPayment) { if (ModelState.IsValid) { db.T_SupplierPayment.Add(t_SupplierPayment); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(t_SupplierPayment)); }
public async Task <ActionResult> Create([Bind(Include = "PageId,SubMenuHeadID,MenuHeadID,PageName,URL,CreateDate,LastUpdateDate,IsRemoved,PageTitle,LiID")] MenuPageWeb menuPageWeb) { if (ModelState.IsValid) { db.MenuPageWebs.Add(menuPageWeb); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(menuPageWeb)); }
public async Task <ActionResult> Create([Bind(Include = "CategoryID,CategoryName,IsRemoved,IUser,EUser,IDate,EDate")] T_Category t_Category) { if (ModelState.IsValid) { db.T_Category.Add(t_Category); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(t_Category)); }
public async Task <ActionResult> Create([Bind(Include = "ReceiveDetailId,ReceiveId,CategoryID,SubCategoryID,ProductID,LotNo,UnitId,Qty,CostPrice,ReturnQty,SalePrice,BrId")] T_GRN_DTL t_GRN_DTL) { if (ModelState.IsValid) { db.T_GRN_DTL.Add(t_GRN_DTL); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(t_GRN_DTL)); }
public async Task <ActionResult> Create([Bind(Include = "ReceiveId,ReceiveDate,ReceiveNo,InvoiceNo,SupplierID,ApprovedStatus,GrossAmount,Discount,CashPaid,DueAmount,Type,IsRemoved,IUSER,EUSER,IDAT,EDAT,BrId")] T_GRN_MST t_GRN_MST) { if (ModelState.IsValid) { db.T_GRN_MST.Add(t_GRN_MST); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(t_GRN_MST)); }
public async Task <ActionResult> Create([Bind(Include = "UnitID,UnitName,IsRemoved,IUser,EUser,IDate,EDate")] T_UNIT t_UNIT) { if (ModelState.IsValid) { db.T_UNIT.Add(t_UNIT); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(t_UNIT)); }
public async Task <ActionResult> Create([Bind(Include = "CmpId,cmpName,BrId,BrName,cmpAddressLine1,cmpAddressLine2,ContactNo,Email,Web,OpenDate,TrnDate,FStartDate,FEndDate,CurrentDate,Logo,Vat,Vat_Area,Vat_RegiNo,Bill_Invoice_Print_Type")] CompanyInfo companyInfo) { if (ModelState.IsValid) { db.CompanyInfoes.Add(companyInfo); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(companyInfo)); }
public async Task <ActionResult> Create([Bind(Include = "ProductID,CategoryID,SubCategoryID,PBarcode,PName,CostPrice,SalePrice,Discount,ReorderLevel,Manufacture,UnitID,IUser,EUser,IDate,EDate,IsRemoved,SalingPrice")] ViewModel viewModel, int?categoryID, int?SubCategoryID) { ViewModel model = new ViewModel(); SPOSEntities entities = new SPOSEntities(); foreach (var category in entities.T_Category) { model.PT_Category.Add(new SelectListItem { Text = category.CategoryName, Value = category.CategoryID.ToString() }); } if (categoryID.HasValue) { var T_SubCategory = (from subcategory in entities.T_SubCategory where subcategory.CategoryID == categoryID.Value select subcategory).ToList(); foreach (var subcategory in T_SubCategory) { model.PT_SubCategory.Add(new SelectListItem { Text = subcategory.SubCategoryName, Value = subcategory.SubCategoryID.ToString() }); } } if (ModelState.IsValid && SubCategoryID.HasValue) { viewModel.Products.CategoryID = categoryID.Value; viewModel.Products.SubCategoryID = SubCategoryID.Value; db.T_PROD.Add(viewModel.Products); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(model)); }