public List <View_tbl_Product> SearchByComp() { using (var context = new CashCarryEntities3()) { return(context.View_tbl_Product.Where(a => a.Company == Company).ToList()); } }
public void Save() { using (var context = new CashCarryEntities3()) { tbl_Customer objCus = new tbl_Customer(); if (objCus.DuePayment != 0) { objCus.Name = Name; objCus.CusTypeID = CusTypeID; objCus.Address = Address; objCus.Contact = Contact; objCus.Email = Email; objCus.ZoneID = ZoneID; objCus.DuePayment = Duepayment; objCus.SubRouteId = SubZoneId; } else { objCus.Name = Name; objCus.CusTypeID = CusTypeID; objCus.Address = Address; objCus.Contact = Contact; objCus.Email = Email; objCus.ZoneID = ZoneID; objCus.DuePayment = 0; objCus.SubRouteId = SubZoneId; } context.tbl_Customer.Add(objCus); context.SaveChanges(); } }
public List <tbl_CustomerTypes> Select() { using (var context = new CashCarryEntities3()) { return(context.tbl_CustomerTypes.ToList()); } }
public List <View_tbl_Customer> SearchByZone() { using (var context = new CashCarryEntities3()) { return(context.View_tbl_Customer.Where(a => a.ZoneID == ZoneID).ToList()); } }
public List <View_tbl_Customer> Select() { using (var context = new CashCarryEntities3()) { return(context.View_tbl_Customer.ToList()); } }
public List <tbl_Category> Search() { using (var context = new CashCarryEntities3()) { return(context.tbl_Category.Where(a => a.CategoryID == CategoryID).ToList()); } }
public List <View_ProductPrice> Select() { using (var context = new CashCarryEntities3()) { return(context.View_ProductPrice.ToList()); } }
public void Update() { using (var context = new CashCarryEntities3()) { var result = context.tbl_employee.Where(a => a.EmployeeID == EmployeeID).SingleOrDefault(); if (result != null) { result.Name = Name; result.Fname = Fname; result.Gender = Gender; result.Password = Password; result.Qualifiction = Qualifiction; result.Username = Username; result.DOB = DOB; result.Designation = Designation; result.Contact = Contact; result.Cnic = Cnic; result.Address = Address; result.Salary = Salary; result.AsignDate = AsignDate; context.SaveChanges(); } ; } }
public List <tbl_employee> Search() { using (var context = new CashCarryEntities3()) { return(context.tbl_employee.Where(a => a.EmployeeID == EmployeeID).ToList()); } }
public void Save() { using (var context = new CashCarryEntities3()) { if (RInvoice != 0) { Tbl_SaleRecovery objRec2 = new Tbl_SaleRecovery() { CustomerID = CustomerID, RecoveryDate = RecoveryDate, ReturnCash = ReturnCash, RInvoice = RInvoice, }; context.Tbl_SaleRecovery.Add(objRec2); context.SaveChanges(); } else { Tbl_SaleRecovery objRec = new Tbl_SaleRecovery() { CustomerID = CustomerID, RecoveryDate = RecoveryDate, ReturnCash = ReturnCash }; context.Tbl_SaleRecovery.Add(objRec); context.SaveChanges(); } } }
public List <View_PurLedger> search() { using (var context = new CashCarryEntities3()) { return(context.View_PurLedger.Where(m => m.CompanyID == CompanyID).ToList()); } }
public void Save() { using (var context = new CashCarryEntities3()) { if (PReturnID != 0) { tbl_PurchaseRemain objPur = new tbl_PurchaseRemain() { CompanyID = CompanyID, PReturnID = PReturnID, Date = Date, ReturnCash = ReturnCash }; context.tbl_PurchaseRemain.Add(objPur); context.SaveChanges(); } else { tbl_PurchaseRemain obj = new tbl_PurchaseRemain() { CompanyID = CompanyID, Date = Date, ReturnCash = ReturnCash }; context.tbl_PurchaseRemain.Add(obj); context.SaveChanges(); } } }
public void Save() { using (var context = new CashCarryEntities3()) { if (Status == true) { tbl_Employee_Salary objemp = new tbl_Employee_Salary() { EmployeeID = EmployeeID, Salary = Salary, SalaryDate = SalaryDate, Status = Status }; context.tbl_Employee_Salary.Add(objemp); context.SaveChanges(); } else { tbl_Employee_Salary objemp = new tbl_Employee_Salary() { EmployeeID = EmployeeID, ResginDate = ResignDate, Salary = Salary, SalaryDate = SalaryDate, Status = Status }; context.tbl_Employee_Salary.Add(objemp); context.SaveChanges(); } } }
public List <View_tbl_Product> SearchByProName() { using (var context = new CashCarryEntities3()) { return(context.View_tbl_Product.Where(a => a.ProductName.Contains(ProductName.ToLower())).ToList()); } }
public List <View_SubZone> Select() { using (var context = new CashCarryEntities3()) { return(context.View_SubZone.ToList()); } }
public List <tbl_employee> SearchByDesig() { using (var context = new CashCarryEntities3()) { return(context.tbl_employee.Where(a => a.Designation == "Salesman").ToList()); } }
public List <View_SubZone> SearchByName() { using (var context = new CashCarryEntities3()) { return(context.View_SubZone.Where(a => a.SubRouteName.Contains(SubRouteName.ToLower())).ToList()); } }
public List <tbl_Login_Type> SelectLogin() { using (var context = new CashCarryEntities3()) { return(context.tbl_Login_Type.ToList()); } }
public List <tbl_Category> SearchByName() { using (var context = new CashCarryEntities3()) { return(context.tbl_Category.Where(a => a.CategoryName.Contains(CategoryName.ToLower())).ToList()); } }
public tbl_employee ForLogin() { using (var context = new CashCarryEntities3()) { return(context.tbl_employee.Where(a => a.Username == Username && a.Password == Password).SingleOrDefault()); } }
public List <View_ProductPrice> Search() { using (var context = new CashCarryEntities3()) { return(context.View_ProductPrice.Where(a => a.ProductName.Contains(Productname.ToLower())).ToList()); } }
public List <tbl_Company> SearchByName() { using (var context = new CashCarryEntities3()) { return(context.tbl_Company.Where(a => a.CompanyName == CompanyName).ToList()); } }
public List <tbl_Customer> SearchByName() { using (var context = new CashCarryEntities3()) { return(context.tbl_Customer.Where(a => a.Name == Name).ToList()); } }
public List <tbl_Company> Select() { using (var context = new CashCarryEntities3()) { return(context.tbl_Company.ToList()); } }
public List <View_tbl_Customer> SearchByCusName() { using (var context = new CashCarryEntities3()) { return(context.View_tbl_Customer.Where(a => a.Name.Contains(Name.ToLower())).ToList()); } }
public List <View_DetailPurchase> search() { using (var context = new CashCarryEntities3()) { return(context.View_DetailPurchase.Where(m => m.InvoiceNo == PInvoice).ToList()); } }
public List <tbl_CustomerTypes> Search() { using (var context = new CashCarryEntities3()) { return(context.tbl_CustomerTypes.Where(a => a.CusTypeID == CusTypeID).ToList()); } }
public void SaveDetail() { using (var context = new CashCarryEntities3()) { if (frieght != 0) { Tbl_PurchaseDetail objpur = new Tbl_PurchaseDetail() { PInvoice = PInvoice, ProductID = ProductID, Quantity = Quantity, TotalAmount = Amount, Ctn = Ctn, frieght = frieght, PurchasePrice = TP }; context.Tbl_PurchaseDetail.Add(objpur); context.SaveChanges(); } else { Tbl_PurchaseDetail objpur = new Tbl_PurchaseDetail() { PInvoice = PInvoice, ProductID = ProductID, Quantity = Quantity, TotalAmount = Amount, Ctn = Ctn, frieght = 0 }; context.Tbl_PurchaseDetail.Add(objpur); context.SaveChanges(); } } }
public List <tbl_CustomerTypes> SearchByName() { using (var context = new CashCarryEntities3()) { return(context.tbl_CustomerTypes.Where(a => a.CusType.Contains(CusType.ToLower())).ToList()); } }
public List <View_tbl_Product> SearchByName() { using (var context = new CashCarryEntities3()) { return(context.View_tbl_Product.Where(a => a.ProductName == ProductName).ToList()); } }