public bool SaveCommodity(CommodityModel model) { try { CommodityMaster db = new CommodityMaster() { IsActive = true, name = model.name, commodityType = model.commodityType, IsRestricted = model.IsRestricted, IsPerishable = model.IsPerishable, }; if (!CheckIfNameExists(model.name)) { tRSEntities4.CommodityMasters.Add(db); tRSEntities4.SaveChanges(); return(true); } else { return(false); } } catch (Exception e) { throw e; } }
public bool SaveDDLocalChallan(DDLocalChallanModel model) { try { if (model != null) { DDLocalChallan master = new DDLocalChallan { DDlocalchallanNo = model.DDlocalchallanNo, DDlocalchallanDate = model.DDlocalchallanDate, prideliveryNo = model.prideliveryNo, Hirecharges = model.Hirecharges, vehicleNo = model.vehicleNo, remark = model.remark, isActive = true, }; _tRSEntities4.DDLocalChallans.Add(master); _tRSEntities4.SaveChanges(); return(true); } else { return(false); } } catch (Exception e) { throw e; } }
public bool SaveSeriesGeneration(SeriesGenerationModel model) { try { if (model != null) { //var res = 0; SeriesGeneration series = new SeriesGeneration() { generationdate = model.generationdate, documenttype = model.documenttype, startseriesNo = model.startseriesNo, endseriesNo = model.endseriesNo, count = model.count, isActive = true, }; tRSEntities4.SeriesGenerations.Add(series); tRSEntities4.SaveChanges(); return(true); } else { return(false); } //} } catch (Exception e) { throw e; } }
public bool SaveCostCentre(CostCentreModel model) { try { if (model != null) { CostCentre costCentre = new CostCentre { costcentrename = model.costcentrename, remark = model.remark, isActive = true, }; tRSEntities4.CostCentres.Add(costCentre); tRSEntities4.SaveChanges(); return(true); } else { return(false); } } catch (Exception e) { throw e; } }
public bool SaveLocalVehicleContract(LocalVehicleContractModel model) { try { if (model != null) { LocalVehicleContractMaster localVehicle = new LocalVehicleContractMaster(); localVehicle.branch = model.branch; localVehicle.vehicleNo = model.vehicleNo; localVehicle.vendorDetail = model.vendorDetail; localVehicle.fromdate = model.fromdate; localVehicle.todate = model.todate; localVehicle.freightsettlement = model.freightsettlement; localVehicle.hirebasis = model.hirebasis; localVehicle.hirerate = model.hirerate; localVehicle.IsActive = true; tRSEntities4.LocalVehicleContractMasters.Add(localVehicle); tRSEntities4.SaveChanges(); return(true); } else { return(false); } } catch (Exception e) { throw e; } }
public bool SaveBankMaster(BankMasterModel model) { try { if (model != null) { BankMaster BM = new BankMaster(); BM.id = 111; BM.Bank_Name = model.Bank_Name; BM.IFSC_code = model.IFSC_code; BM.Bank_Branch = model.Bank_Branch; BM.Address = model.Address; BM.state = model.state; BM.city = model.city; BM.Contact = model.Contact; BM.DOC = DateTime.Now; BM.DOM = DateTime.Now; BM.IsActive = true; _tRSEntities.BankMasters.Add(BM); _tRSEntities.SaveChanges(); return(true); } } catch (Exception e) { throw e; } return(true); }
public bool SaveRTO(RTOModel model) { try { RTOMaster master = new RTOMaster(); master.rtoCode = model.rtoCode; master.name = model.name; master.address = model.address; master.city = model.city; master.pinCode = model.pinCode; master.state = model.state; master.stdCode = model.stdCode; master.phoneNo = model.phoneNo; master.emailId = model.emailId; master.website = model.website; master.remark = model.remark; master.mobileNo = model.mobileNo; master.isActive = true; _tRSEntities.RTOMasters.Add(master); _tRSEntities.SaveChanges(); return(true); } catch (Exception e) { throw e; } }
public bool SaveUploadPackingSlip(UploadPackingSlipModel model) { try { if (model != null) { UploadPackingSlip uploadPacking = new UploadPackingSlip { cnNo = model.cnNo, rollNo = model.rollNo, srtoNo = model.srtoNo, lotNo = model.lotNo, meter = model.meter, weightInKg = model.weightInKg, isActive = true, }; tRSEntities4.UploadPackingSlips.Add(uploadPacking); tRSEntities4.SaveChanges(); return(true); } else { return(false); } } catch (Exception e) { throw e; } }
public bool SavePackingType(PackingTypeModel model) { try { PackingTypeMaster master = new PackingTypeMaster() { name = model.name, IsActive = true, }; if (!CheckIfNameExists(model.name)) { _tRSEntities4.PackingTypeMasters.Add(master); _tRSEntities4.SaveChanges(); return(true); } else { return(false); } } catch (Exception e) { throw e; } }
public bool SaveArea(AreaModel model) { try { AreaMaster md = new AreaMaster(); md.areaCode = model.areaCode; md.areaName = model.areaName; md.address = model.address; md.city = model.city; md.pinCode = model.pinCode; md.state = model.state; md.phoneNo = model.phoneNo; md.mobileNo = model.mobileNo; md.emailId = model.emailId; md.region = model.region; md.cashBalanceLimit = model.cashBalanceLimit; md.bankBalanceLimit = model.bankBalanceLimit; md.remark = model.remark; md.isActive = true; _tRSEntities.AreaMasters.Add(md); _tRSEntities.SaveChanges(); return(true); } catch (Exception e) { throw e; } }
public bool SaveTruckArrival(TruckArrivalModel model) { try { if (model != null) { TruckArrival truckArrival = new TruckArrival { truckArrivalNo = model.truckArrivalNo, truckArrivalDate = model.truckArrivalDate, vehicleNo = model.vehicleNo, challanNo = model.challanNo, challanDate = model.challanDate, challanFrom = model.challanFrom, challanTo = model.challanTo, scheduledArriDate = model.scheduledArriDate, expectedUnloadingTime = model.expectedUnloadingTime, Remark = model.Remark, isActive = true, }; tRSEntities4.TruckArrivals.Add(truckArrival); tRSEntities4.SaveChanges(); return(true); } else { return(false); } } catch (Exception e) { throw e; } }
public bool SaveReserveBooking(ReserveBookingModel model) { try { if (model != null) { ReserveBooking booking = new ReserveBooking { branch = model.branch, Consignor = model.Consignor, CNfrom = model.CNfrom, CNto = model.CNto, isActive = true, }; tRSEntities4.ReserveBookings.Add(booking); tRSEntities4.SaveChanges(); return(true); } else { return(false); } } catch (Exception e) { throw e; } }
public bool SavePrintingStationary(PrintingStationaryModel model) { try { if (model != null) { PrintingStationary printing = new PrintingStationary { dateofprinting = model.dateofprinting, documenttype = model.documenttype, startseriesNo = model.startseriesNo, endseriesNo = model.endseriesNo, count = model.count, isActive = true }; tRSEntities4.PrintingStationaries.Add(printing); tRSEntities4.SaveChanges(); return(true); } else { return(false); } } catch (Exception e) { throw e; } }
//Save public bool SaveFreight(FreightModel model) { try { FreightMaster db = new FreightMaster() { isActive = true, bookingType = model.bookingType, transpotType = model.transpotType, frombranch = model.frombranch, tobranch = model.tobranch, rateperKG = model.rateperKG, distance = model.distance, transitdays = model.transitdays, //tobranchname=model.tobranchname }; _trs.FreightMasters.Add(db); _trs.SaveChanges(); return(true); } catch (Exception e) { throw e; } }
public bool SaveDocumentSeriesAllocation(DocumentSeriesAllocationModel model) { try { if (model != null) { //double res = 0; DocumentSeriesAllocation allocationRepo = new DocumentSeriesAllocation { dateofallocation = model.dateofallocation, branch = model.branch, documenettype = model.documenettype, startseriesNo = model.startseriesNo, endseriesNo = model.endseriesNo, count = model.count, isActive = true, }; tRSEntities.DocumentSeriesAllocations.Add(allocationRepo); tRSEntities.SaveChanges(); return(true); } return(false); } catch (Exception e) { throw e; } }
public bool SaveDepartment(DepartmentModel model) { try { DepartmentMaster master = new DepartmentMaster() { isActive = true, name = model.name, }; if (!CheckIfNameExists(model.name)) { _tRSEntities4.DepartmentMasters.Add(master); _tRSEntities4.SaveChanges(); return(true); } else { return(false); } } catch (Exception e) { throw e; } }
public bool SaveLedgerGroupFinance(LedgerGroupFinanceModel model) { try { if (model != null) { LedgerGroupFinance ledger = new LedgerGroupFinance { ledgergroupname = model.ledgergroupname, nature = model.nature, isActive = true, }; tRSEntities.LedgerGroupFinances.Add(ledger); tRSEntities.SaveChanges(); return(true); } else { return(false); } } catch (Exception e) { throw e; } }
public bool SaveServiceLocation(ServiceLocationModel model) { try { ServiceLocationMaster db = new ServiceLocationMaster() { isActive = true, servicelocationcode = model.servicelocationcode, servicelocationname = model.servicelocationname, defaultdeliverytype = model.defaultdeliverytype, controllingbranch = model.controllingbranch, deliveryat = model.deliveryat, distancefrombranch = model.distancefrombranch, istodaybooking = model.istodaybooking, pickupcharges = model.pickupcharges, DDCharges = model.DDCharges, }; _trs.ServiceLocationMasters.Add(db); _trs.SaveChanges(); return(true); } catch (Exception e) { throw e; } }
public bool SaveCommodityType(CommodityTypeModel model) { try { CommodityTypeMaster master = new CommodityTypeMaster() { Name = model.Name, isActive = true, }; if (!CheckIdNameExists(model.Name)) { _tRSEntities4.CommodityTypeMasters.Add(master); _tRSEntities4.SaveChanges(); return(true); } else { return(false); } } catch (Exception e) { throw e; } }
public bool SaveVehicleModel(VehicleModel model) { try { VehicleModelMaster typeModel = new VehicleModelMaster() { isActive = true, //name = model.name, modelname = model.modelname, manufacturername = model.manufacturername, vehicleweightinMT = model.vehicleweightinMT, unladenweightinMT = model.unladenweightinMT, vehiclecapacity = model.vehiclecapacity, length = model.length, width = model.width, height = model.height, }; tRSEntities4.VehicleModelMasters.Add(typeModel); tRSEntities4.SaveChanges(); return(true); } catch (Exception e) { throw e; } }
public bool SaveStandardLorryHire(StandardLorryHireModel model) { try { if (model != null) { StandardLorryHireMaster standard = new StandardLorryHireMaster(); standard.date = model.date; standard.vehicleType = model.vehicleType; standard.vehiclecpacityMT = model.vehiclecpacityMT; standard.from = model.from; standard.to = model.to; standard.lorryhire = model.lorryhire; standard.isActive = true; tRSEntities4.StandardLorryHireMasters.Add(standard); tRSEntities4.SaveChanges(); return(true); } else { return(false); } } catch (Exception e) { throw e; } }
public bool SaveOutward(OutwardModel model) { try { if (model != null) { OutwardMaster outward = new OutwardMaster { challandate = model.challandate, vehicleNo = model.vehicleNo, vehiclecapacityMT = model.vehiclecapacityMT, challantype = model.challantype, challanNo = model.challanNo, frombranch = model.frombranch, tobranch = model.tobranch, brokerloadingslipno = model.brokerloadingslipno, brokername = model.brokername, drivername = model.drivername, driverlicenceNo = model.driverlicenceNo, drivermobileNo = model.drivermobileNo, CNno = model.CNno, CNdate = model.CNdate, bookingbranch = model.bookingbranch, deliverylocation = model.deliverylocation, deliverytype = model.deliverytype, balancepackeges = model.balancepackeges, balanceweight = model.balanceweight, loadedpackages = model.loadedpackages, loadedweight = model.loadedweight, rollno = model.rollno, truckhirechareges = model.truckhirechareges, othercharges = model.othercharges, TDS = model.TDS, TDSamount = model.TDSamount, totaltruckhire = model.totaltruckhire, advence = model.advence, advencepayableAt = model.advencepayableAt, balancepayableAt = model.balancepayableAt, RC = model.RC, PAN = model.PAN, drivinglicenceAttach = model.drivinglicenceAttach, loadinglicenceAttach = model.loadinglicenceAttach, TransitDays = model.TransitDays, isActive = true, }; tRSEntities4.OutwardMasters.Add(outward); tRSEntities4.SaveChanges(); return(true); } else { return(false); } } catch (Exception e) { throw e; } }
public int SaveRequirement(RequirementModel model) { try { if (model != null) { Requirement requirement = new Requirement { requirementNo = model.requirementNo, requirementDate = model.requirementDate, requirementType = model.requirementType, DRLedgerNameTo = model.DRLedgerNameTo, DRAmount = model.DRAmount, DRLedgerNameFrom = model.DRLedgerNameFrom, DRAmount1 = model.DRAmount1, referenceNo = model.referenceNo, remark = model.remark, challanNo = model.challanNo, RENT = model.RENT, SALARY = model.SALARY, ADMIN = model.ADMIN, fileupload = model.fileupload, IsApprove = model.IsApprove, rejectremark = model.rejectremark, //requirementNo1 = model.requirementNo1, //requirementDate1=model.requirementDate1, //requirementType1 = model.requirementType1, //DRLedgerNameTo1 = model.DRLedgerNameTo1, //DRLedgerNameFrom1 = model.DRLedgerNameFrom1, //DRAmount2 = model.DRAmount2, //remark1 = model.remark1, //referenceNo = model.referenceNo, //challanNo1 = model.challanNo1, //RENT1 = model.RENT1, //SALARY1 = model.SALARY1, //ADMIN1 = model.ADMIN1, //fileupload1 = model.fileupload1, isActive = true, }; tRSEntities.Requirements.Add(requirement); tRSEntities.SaveChanges(); model.id = requirement.id; return(model.id); } //else //{ // return false; //} } catch (Exception e) { throw e; } return(model.id); }
public bool SaveGoddownOwnerDetails(GoddownOwnerDetailsModel model) { try { if (model != null) { GodownOwnerDetailsMaster gdm = new GodownOwnerDetailsMaster(); gdm.goddownOwnerCode = model.goddownOwnerCode; gdm.branch = model.branch; gdm.goddown = model.goddown; gdm.ownerName = model.ownerName; gdm.address = model.address; gdm.city = model.city; gdm.pinCode = model.pinCode; gdm.state = model.state; gdm.stdCode = model.stdCode; gdm.phoneNo = model.phoneNo; gdm.mobileNo = model.mobileNo; gdm.emailId = model.emailId; gdm.sqft = model.sqft; gdm.ratePerSqft = model.ratePerSqft; gdm.rentAmount = model.rentAmount; gdm.gst = model.gst; gdm.totalRent = model.totalRent; gdm.tds = model.tds; gdm.netRent = model.netRent; gdm.pan = model.pan; gdm.gstin = model.gstin; gdm.bank = model.bank; gdm.ifsc = model.ifsc; gdm.a_cno = model.a_cno; gdm.chequeInTheNameOf = model.chequeInTheNameOf; gdm.nextVersionDate = model.nextVersionDate; gdm.holdPaymentInstruction = model.holdPaymentInstruction; gdm.reamrk = model.reamrk; gdm.isRented = model.isRented; gdm.rentPaymentType = model.rentPaymentType; gdm.securityDeposit = model.securityDeposit; gdm.agreementStartDate = model.agreementStartDate; gdm.agreementEndDate = model.agreementEndDate; gdm.noticePeriodInDays = model.noticePeriodInDays; gdm.isActive = true; _tRSEntities.GodownOwnerDetailsMasters.Add(gdm); _tRSEntities.SaveChanges(); return(true); } else { return(false); } } catch (Exception e) { throw e; } }
public bool SaveDriver(DriverModel model) { try { if (model != null) { DriverMaster driver = new DriverMaster(); driver.name = model.name; driver.drivercategory = model.drivercategory; driver.isreliable = model.isreliable; driver.DOB = model.DOB; driver.Religion = model.Religion; driver.qualification = model.qualification; driver.maritalstatus = model.maritalstatus; driver.drivinglicencecategory = model.drivinglicencecategory; driver.drivinglicenceNo = model.drivinglicenceNo; driver.drivLiceIssueAuthoLoca = model.drivLiceIssueAuthoLoca; driver.drivLiceExDate = model.drivLiceExDate; driver.bloodgroup = model.bloodgroup; driver.Address = model.Address; driver.state = model.state; driver.city = model.city; driver.STDcode = model.STDcode; driver.phoneno = model.phoneno; driver.mobileno = model.mobileno; driver.referencename = model.referencename; driver.referenceaddress = model.referenceaddress; driver.referencecity = model.referencecity; driver.referencepincode = model.referencepincode; driver.referencemobileno = model.referencemobileno; driver.referencephoneno = model.referencephoneno; driver.policyno = model.policyno; driver.insurancecompany = model.insurancecompany; driver.insurancevalue = model.insurancevalue; driver.nomination = model.nomination; driver.insuranceexpirydate = model.insuranceexpirydate; driver.fileupload = model.fileupload; driver.isActive = true; tRSEntities4.DriverMasters.Add(driver); tRSEntities4.SaveChanges(); return(true); } else { return(false); } } catch (Exception e) { throw e; } }
public bool SaveVehicleMaster(VehicleMasterModel model) { try { VehicleMaster master = new VehicleMaster(); master.vehiclecategory = model.vehiclecategory; master.vehicleNo = model.vehicleNo; master.vehicleType = model.vehicleType; master.manufacturer = model.manufacturer; master.vehiclemodel = model.vehiclemodel; master.yearofmanufacturing = model.yearofmanufacturing; master.GPSID = model.GPSID; master.drivername = model.drivername; master.ownerdetails = model.ownerdetails; master.chassisNo = model.chassisNo; master.engineNo = model.engineNo; master.trollychassisNo = model.trollychassisNo; master.fueltankCapacity = model.fueltankCapacity; master.vehicleweightinMT = model.vehicleweightinMT; master.unladenweightinMT = model.unladenweightinMT; master.vehicleCapacity = model.vehicleCapacity; master.wheelbaseinMM = model.wheelbaseinMM; master.lengthinFt = model.lengthinFt; master.widthinft = model.widthinft; master.heightinft = model.heightinft; master.powerinCC = model.powerinCC; master.paintCode = model.paintCode; master.paintColour = model.paintColour; master.ignitionkey = model.ignitionkey; master.doorkeycode = model.doorkeycode; master.bankfanainstuName = model.bankfanainstuName; master.loanaccountNo = model.loanaccountNo; master.fileUpload = model.fileUpload; master.wheelsize = model.wheelsize; master.tyresize = model.tyresize; master.psi = model.psi; master.registrationDate = model.registrationDate; master.fitnessDate = model.fitnessDate; master.permitfromdate = model.permitfromdate; master.insurancefromdate = model.insurancefromdate; //master.fileuploadimage = model.fileuploadimage; master.isActive = true; tRSEntities4.VehicleMasters.Add(master); tRSEntities4.SaveChanges(); return(true); } catch (Exception e) { throw e; } }
public bool SaveGodownDelivery(GodownDeliveryModel model) { try { if (model != null) { GodownDelivery godown = new GodownDelivery { gatepassNo = model.gatepassNo, gatepassdate = model.gatepassdate, paymentmode = model.paymentmode, deliveryparty = model.deliveryparty, deliverypartydetails = model.deliverypartydetails, contractparty = model.contractparty, contractpartydetails = model.contractpartydetails, CNno = model.CNno, CNdate = model.CNdate, bookingbranch = model.bookingbranch, consignor = model.consignor, item = model.item, packingType = model.packingType, godownname = model.godownname, virtualgodownname = model.virtualgodownname, deliveryarticle = model.deliveryarticle, deliveryweight = model.deliveryweight, balancearticle = model.balancearticle, balanceweight = model.balanceweight, rollno = model.rollno, handedoverto = model.handedoverto, contractNo = model.contractNo, vehicleNo = model.vehicleNo, GUTKANo = model.GUTKANo, remark = model.remark, isActive = true, }; tRSEntities4.GodownDeliveries.Add(godown); tRSEntities4.SaveChanges(); return(true); } else { return(false); } } catch (Exception e) { throw e; } }
public bool SaveBranchRateDetails(BranchRateModel item) { try { if (item != null) { BranchRate model = new BranchRate(); model.Id = item.Id; model.General = item.General; model.Commodity = item.Commodity; model.MinimumChargeWeightin = item.MinimumChargeWeightin; model.StatisticChargesinRS = item.StatisticChargesinRS; model.CFTFactorinKG = item.CFTFactorinKG; model.FOVin = item.FOVin; model.HamaliperArticleinRS = item.HamaliperArticleinRS; model.MinimumHamaliinRS = item.MinimumHamaliinRS; model.Surcharges = item.Surcharges; model.CoverCharges = item.CoverCharges; model.MiscCharges = item.MiscCharges; model.GodownCharges = item.GodownCharges; model.CODCharges = item.CODCharges; model.DemurrageExemptDays = item.DemurrageExemptDays; model.DemurrageRate = item.DemurrageRate; model.GICharges = item.GICharges; model.DoorDeliveryCharges = item.DoorDeliveryCharges; model.FirstNoticeDays = item.FirstNoticeDays; model.SecondNoticeDays = item.SecondNoticeDays; model.FinalNoticeDays = item.FinalNoticeDays; model.Discount = item.Discount; model.BranchRateParameter = item.BranchRateParameter; model.OtherBranchCommodity = item.OtherBranchCommodity; model.DOC = DateTime.Now; model.DOM = DateTime.Now; model.IsActive = true; _TRSEntities2.BranchRates.Add(model); _TRSEntities2.SaveChanges(); return(true); } else { return(false); } } catch (Exception e) { throw e; } }
public bool SaveAccount(AccountModel model) { try { if (model != null) { AccountMaster master = new AccountMaster { ledgergroupname = model.ledgergroupname, nature = model.nature, ledgername = model.ledgername, PAN = model.PAN, GSTIN = model.GSTIN, accountno = model.accountno, address = model.address, city = model.city, pincode = model.pincode, state = model.state, STDcode = model.STDcode, phoneno = model.phoneno, mobileno = model.mobileno, emailid = model.emailid, emailalert = model.emailalert, mobilealert = model.mobilealert, openingbalance = model.openingbalance, openingamount = model.openingamount, applicablelocation = model.applicablelocation, remark = model.remark, costcentrename = model.costcentrename, remark1 = model.remark1, isActive = true, }; tRSEntities.AccountMasters.Add(master); tRSEntities.SaveChanges(); return(true); } else { return(false); } } catch (Exception e) { throw e; } }
public bool SaveWalkInClient(WalkinClientModel model) { try { if (model != null) { Walk_inClientMaster clientMaster = new Walk_inClientMaster { name = model.name, contactperno = model.contactperno, address = model.address, cityid = model.cityid, pincode = model.pincode, stateid = model.stateid, STDcode = model.STDcode, phone = model.phone, mobile = model.mobile, emailid = model.emailid, emailalert = model.emailalert, mobilealert = model.mobilealert, pan = model.pan, gstIN = model.gstIN, deliveryAgainstAsCnr = model.deliveryAgainstAsCnr, deliveryAgainstAsCne = model.deliveryAgainstAsCne, companyname = model.companyname, policyno = model.policyno, validfromdate = model.validfromdate, validtodate = model.validtodate, insuranceamount = model.insuranceamount, isMarineIsured = model.isMarineIsured, isActive = true, }; _tRS.Walk_inClientMaster.Add(clientMaster); _tRS.SaveChanges(); return(true); } else { return(false); } } catch (Exception e) { throw e; } }