Esempio n. 1
0
        public ActionResult Create(tblLogin tbllogin)
        {
            if (ModelState.IsValid)
            {
                db.tblLogins.Add(tbllogin);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(tbllogin));
        }
Esempio n. 2
0
        public ActionResult Create(tblBillEntry tblbillentry)
        {
            if (ModelState.IsValid)
            {
                db.tblBillEntries.Add(tblbillentry);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.BillNo = new SelectList(db.tblBills, "BillNo", "BillDate", tblbillentry.BillNo);
            return(View(tblbillentry));
        }
Esempio n. 3
0
        public ActionResult Create(tblChallanEntry tblchallanentry)
        {
            if (ModelState.IsValid)
            {
                db.tblChallanEntries.Add(tblchallanentry);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.ChallanNo = new SelectList(db.tblChallans, "ChallanNo", "VehicleNo", tblchallanentry.ChallanNo);
            return(View(tblchallanentry));
        }
Esempio n. 4
0
 public static int Save(tblAccountsMasterDTO tblAccountsMasterDTO)
 {
     using (var dbObject = new BRCTransportDBEntities())
     {
         var tblAccountsMaster = tblAccountsMasterDTO.ToEntity();
         if (tblAccountsMasterDTO.AccountId == 0)
         {
             dbObject.tblAccountsMasters.Add(tblAccountsMaster);
         }
         else
         {
             tblAccountsMaster                = dbObject.tblAccountsMasters.Find(tblAccountsMasterDTO.AccountId);
             tblAccountsMaster.AccountName    = tblAccountsMasterDTO.AccountName;
             tblAccountsMaster.AccountType    = tblAccountsMasterDTO.AccountType;
             tblAccountsMaster.AccountNo      = tblAccountsMasterDTO.AccountNo;
             tblAccountsMaster.Addrees        = tblAccountsMasterDTO.Addrees;
             tblAccountsMaster.PhoneNo        = tblAccountsMasterDTO.PhoneNo;
             tblAccountsMaster.OpeningBalance = tblAccountsMasterDTO.OpeningBalance;
             tblAccountsMaster.OpeningDate    = tblAccountsMasterDTO.OpeningDate;
             tblAccountsMaster.Description    = tblAccountsMasterDTO.Description;
         }
         dbObject.SaveChanges();
         return(tblAccountsMaster.AccountId);
     }
 }
 public static int Save(tblTransactionDTO tblTransactionDTO)
 {
     using (var dbObject = new BRCTransportDBEntities())
     {
         var tblTransaction = tblTransactionDTO.ToEntity();
         if (tblTransactionDTO.TransactionId == 0)
         {
             dbObject.tblTransactions.Add(tblTransaction);
         }
         else
         {
             tblTransaction             = dbObject.tblTransactions.Find(tblTransactionDTO.TransactionId);
             tblTransaction.AccountId   = tblTransactionDTO.AccountId;
             tblTransaction.TDate       = tblTransactionDTO.TDate;
             tblTransaction.DrAmount    = tblTransactionDTO.DrAmount;
             tblTransaction.CrAmount    = tblTransactionDTO.CrAmount;
             tblTransaction.Recievedby  = tblTransactionDTO.Recievedby;
             tblTransaction.PaidBy      = tblTransactionDTO.PaidBy;
             tblTransaction.Description = tblTransactionDTO.Description;
             tblTransaction.ChequeNo    = tblTransactionDTO.ChequeNo;
             tblTransaction.ChequeDate  = tblTransactionDTO.ChequeDate;
         }
         dbObject.SaveChanges();
         return(tblTransaction.TransactionId);
     }
 }
Esempio n. 6
0
 public static int Save(tblMRNoteDTO tblMRNoteDTO)
 {
     using (var dbObject = new BRCTransportDBEntities())
     {
         var tblMRNote = tblMRNoteDTO.ToEntity();
         if (tblMRNoteDTO.MRId == 0)
         {
             dbObject.tblMRNotes.Add(tblMRNote);
         }
         else
         {
             tblMRNote                = dbObject.tblMRNotes.Find(tblMRNoteDTO.MRId);
             tblMRNote.MrNo           = tblMRNoteDTO.MrNo;
             tblMRNote.BillId         = tblMRNoteDTO.BillId;
             tblMRNote.MRDate         = tblMRNoteDTO.MRDate;
             tblMRNote.RecievedFrom   = tblMRNoteDTO.RecievedFrom;
             tblMRNote.LocationFrom   = tblMRNoteDTO.LocationFrom;
             tblMRNote.LocationTo     = tblMRNoteDTO.LocationTo;
             tblMRNote.NoofPackages   = tblMRNoteDTO.NoofPackages;
             tblMRNote.Weight         = tblMRNoteDTO.Weight;
             tblMRNote.AmountRecieved = tblMRNoteDTO.AmountRecieved;
             tblMRNote.WayOfRecieve   = tblMRNoteDTO.WayOfRecieve;
             tblMRNote.Fright         = tblMRNoteDTO.Fright;
             tblMRNote.StCharges      = tblMRNoteDTO.StCharges;
             tblMRNote.Hamali         = tblMRNoteDTO.Hamali;
             tblMRNote.Other1         = tblMRNoteDTO.Other1;
             tblMRNote.Other2         = tblMRNoteDTO.Other2;
             tblMRNote.Other3         = tblMRNoteDTO.Other3;
             tblMRNote.Other4         = tblMRNoteDTO.Other4;
             tblMRNote.TotalAmount    = tblMRNoteDTO.TotalAmount;
         }
         dbObject.SaveChanges();
         return(tblMRNote.MRId);
     }
 }
 public static int SaveChallanEntry(tblChallanEntryDTO tblChallanEntryDTO)
 {
     using (var dbObject = new BRCTransportDBEntities())
     {
         var tblChallanEntryObject = tblChallanEntryDTO.ToEntity();
         if (tblChallanEntryDTO.ChallanEntryNo == 0)
         {
             dbObject.tblChallanEntries.Add(tblChallanEntryObject);
         }
         else
         {
             tblChallanEntryObject                   = dbObject.tblChallanEntries.Find(tblChallanEntryDTO.ChallanEntryNo);
             tblChallanEntryObject.ChallanId         = tblChallanEntryDTO.ChallanId;
             tblChallanEntryObject.ChallanId         = tblChallanEntryDTO.ChallanId;
             tblChallanEntryObject.BkgStnCode        = tblChallanEntryDTO.BkgStnCode;
             tblChallanEntryObject.CNNoWithAlphaCode = tblChallanEntryDTO.CNNoWithAlphaCode;
             tblChallanEntryObject.PackagesNos       = tblChallanEntryDTO.PackagesNos;
             tblChallanEntryObject.PackagesMethod    = tblChallanEntryDTO.PackagesMethod;
             tblChallanEntryObject.SaidToContain     = tblChallanEntryDTO.SaidToContain;
             tblChallanEntryObject.ActualWeightKgs   = tblChallanEntryDTO.ActualWeightKgs;
             tblChallanEntryObject.DestinationName   = tblChallanEntryDTO.DestinationName;
         }
         dbObject.SaveChanges();
         return(tblChallanEntryObject.ChallanEntryNo);
     }
 }
Esempio n. 8
0
 public static int SaveBillEntry(tblBillEntryDTO tblBillEntryDTO)
 {
     using (var dbObject = new BRCTransportDBEntities())
     {
         var tblBillEntryObject = tblBillEntryDTO.ToEntity();
         if (tblBillEntryDTO.BillOrderId == 0)
         {
             dbObject.tblBillEntries.Add(tblBillEntryObject);
         }
         else
         {
             tblBillEntryObject                  = dbObject.tblBillEntries.Find(tblBillEntryDTO.BillOrderId);
             tblBillEntryObject.BillId           = tblBillEntryDTO.BillId;
             tblBillEntryObject.BookingOldBrCode = tblBillEntryDTO.BookingOldBrCode;
             tblBillEntryObject.OldBillNo        = tblBillEntryDTO.OldBillNo;
             tblBillEntryObject.OldBillDate      = tblBillEntryDTO.OldBillDate;
             tblBillEntryObject.DestnCode        = tblBillEntryDTO.DestnCode;
             tblBillEntryObject.Particulars      = tblBillEntryDTO.Particulars;
             tblBillEntryObject.ChargedWeight    = tblBillEntryDTO.ChargedWeight;
             tblBillEntryObject.Rate             = tblBillEntryDTO.Rate;
             tblBillEntryObject.Amount           = tblBillEntryDTO.Amount;
         }
         dbObject.SaveChanges();
         return(tblBillEntryObject.BillOrderId);
     }
 }
 public static bool Delete(int transactionId)
 {
     using (var dbObject = new BRCTransportDBEntities())
     {
         var tblTransaction = dbObject.tblTransactions.Find(transactionId);
         dbObject.tblTransactions.Remove(tblTransaction);
         dbObject.SaveChanges();
         return(true);
     }
 }
Esempio n. 10
0
 public static bool Delete(int mrId)
 {
     using (var dbObject = new BRCTransportDBEntities())
     {
         var tblMRNote = dbObject.tblMRNotes.Find(mrId);
         dbObject.tblMRNotes.Remove(tblMRNote);
         dbObject.SaveChanges();
         return(true);
     }
 }
Esempio n. 11
0
 public static bool Delete(int companyId)
 {
     using (var dbObject = new BRCTransportDBEntities())
     {
         var tblAccountsMaster = dbObject.tblAccountsMasters.Find(companyId);
         dbObject.tblAccountsMasters.Remove(tblAccountsMaster);
         dbObject.SaveChanges();
         return(true);
     }
 }
 public static bool Delete(int consigneeId)
 {
     using (var dbObject = new BRCTransportDBEntities())
     {
         var tblConsignee = dbObject.tblConsignees.Find(consigneeId);
         dbObject.tblConsignees.Remove(tblConsignee);
         dbObject.SaveChanges();
         return(true);
     }
 }
Esempio n. 13
0
 public static bool DeleteChallanEntry(int ChallanEntryOrderId)
 {
     using (var dbObject = new BRCTransportDBEntities())
     {
         var tblChallanEntry = dbObject.tblChallanEntries.Find(ChallanEntryOrderId);
         dbObject.tblChallanEntries.Remove(tblChallanEntry);
         dbObject.SaveChanges();
         return(true);
     }
 }
Esempio n. 14
0
 public static int Save(tblBillDTO tblBillDTO)
 {
     using (var dbObject = new BRCTransportDBEntities())
     {
         var tblBillObject = tblBillDTO.ToEntity();
         if (tblBillDTO.BillId == 0)
         {
             dbObject.tblBills.Add(tblBillObject);
             if (tblBillDTO.BillEntryList != null)
             {
                 foreach (var billEntry in tblBillDTO.BillEntryList)
                 {
                     billEntry.BillId = tblBillDTO.BillId;
                     dbObject.tblBillEntries.Add(billEntry.ToEntity());
                 }
             }
         }
         else
         {
             tblBillObject                   = dbObject.tblBills.Find(tblBillDTO.BillId);
             tblBillObject.BillNo            = tblBillDTO.BillNo;
             tblBillObject.BillDate          = tblBillDTO.BillDate;
             tblBillObject.PartyId           = tblBillDTO.PartyId;
             tblBillObject.BranchCode        = tblBillDTO.BranchCode;
             tblBillObject.PaymentDueDate    = tblBillDTO.PaymentDueDate;
             tblBillObject.BillType          = tblBillDTO.BillType;
             tblBillObject.BasicOfChargesGC  = tblBillDTO.BasicOfChargesGC;
             tblBillObject.Enclosure         = tblBillDTO.Enclosure;
             tblBillObject.ServiceTaxThrough = tblBillDTO.ServiceTaxThrough;
             tblBillObject.CheckedBy         = tblBillDTO.CheckedBy;
             tblBillObject.GrandTotal        = tblBillDTO.GrandTotal;
             tblBillObject.ServiceTaxRegdNo  = tblBillDTO.ServiceTaxRegdNo;
             List <tblBillEntry> entry = new List <tblBillEntry>();
             entry = dbObject.tblBillEntries.Where(h => h.BillId == tblBillDTO.BillId).ToList();
             foreach (var item in entry)
             {
                 dbObject.tblBillEntries.Remove(item);
             }
             if (tblBillDTO.BillEntryList != null)
             {
                 foreach (var billEntry in tblBillDTO.BillEntryList)
                 {
                     billEntry.BillId = tblBillDTO.BillId;
                     dbObject.tblBillEntries.Add(billEntry.ToEntity());
                 }
             }
         }
         dbObject.SaveChanges();
         return(tblBillObject.BillId);
     }
 }
 public static bool Delete(int ConsignmentId)
 {
     using (var dbObject = new BRCTransportDBEntities())
     {
         var tblConsignmentNote = dbObject.tblConsignmentNotes.Find(ConsignmentId);
         dbObject.tblConsignmentNotes.Remove(tblConsignmentNote);
         var ConsignmentNoteEntrys = dbObject.tblConsignmentNotes.Where(be => be.ConsignmentId == ConsignmentId);
         foreach (var ConsignmentNoteEntry in ConsignmentNoteEntrys)
         {
             dbObject.tblConsignmentNotes.Remove(ConsignmentNoteEntry);
         }
         dbObject.SaveChanges();
         return(true);
     }
 }
Esempio n. 16
0
 public static bool Delete(int ChallanId)
 {
     using (var dbObject = new BRCTransportDBEntities())
     {
         var tblChallan = dbObject.tblChallans.Find(ChallanId);
         dbObject.tblChallans.Remove(tblChallan);
         var ChallanEntrys = dbObject.tblChallanEntries.Where(be => be.ChallanId == ChallanId);
         foreach (var ChallanEntry in ChallanEntrys)
         {
             dbObject.tblChallanEntries.Remove(ChallanEntry);
         }
         dbObject.SaveChanges();
         return(true);
     }
 }
Esempio n. 17
0
 public static bool Delete(int billId)
 {
     using (var dbObject = new BRCTransportDBEntities())
     {
         var tblBill = dbObject.tblBills.Find(billId);
         dbObject.tblBills.Remove(tblBill);
         var billEntrys = dbObject.tblBillEntries.Where(be => be.BillId == billId);
         foreach (var billEntry in billEntrys)
         {
             dbObject.tblBillEntries.Remove(billEntry);
         }
         dbObject.SaveChanges();
         return(true);
     }
 }
Esempio n. 18
0
 public static int Save(tblCompanyDTO tblCompanyDTO)
 {
     using (var dbObject = new BRCTransportDBEntities())
     {
         var tblCompany = tblCompanyDTO.ToEntity();
         if (tblCompanyDTO.CompanyId == 0)
         {
             dbObject.tblCompanies.Add(tblCompany);
         }
         else
         {
             tblCompany                  = dbObject.tblCompanies.Find(tblCompanyDTO.CompanyId);
             tblCompany.CompanyName      = tblCompanyDTO.CompanyName;
             tblCompany.Address          = tblCompanyDTO.Address;
             tblCompany.PhoneNo          = tblCompanyDTO.PhoneNo;
             tblCompany.Description      = tblCompanyDTO.Description;
             tblCompany.ServiceTaxRegdNo = tblCompanyDTO.ServiceTaxRegdNo;
             tblCompany.PolicyNo         = tblCompanyDTO.PolicyNo;
         }
         dbObject.SaveChanges();
         return(tblCompany.CompanyId);
     }
 }
 public static int Save(tblConsigneeDTO tblConsigneeDTO)
 {
     using (var dbObject = new BRCTransportDBEntities())
     {
         var tblConsignee = tblConsigneeDTO.ToEntity();
         if (tblConsigneeDTO.ConsigneeId == 0)
         {
             dbObject.tblConsignees.Add(tblConsignee);
         }
         else
         {
             tblConsignee = dbObject.tblConsignees.Find(tblConsigneeDTO.ConsigneeId);
             tblConsignee.ConsigneeName = tblConsigneeDTO.ConsigneeName;
             tblConsignee.Address       = tblConsigneeDTO.Address;
             tblConsignee.PhoneNo       = tblConsigneeDTO.PhoneNo;
             tblConsignee.STNOCSTNO     = tblConsigneeDTO.STNOCSTNO;
             tblConsignee.TINNOVATNO    = tblConsigneeDTO.TINNOVATNO;
             tblConsignee.Description   = tblConsigneeDTO.Description;
         }
         dbObject.SaveChanges();
         return(tblConsignee.ConsigneeId);
     }
 }
Esempio n. 20
0
 public static int Save(tblChallanDTO tblChallanDTO)
 {
     using (var dbObject = new BRCTransportDBEntities())
     {
         var tblChallanObject = tblChallanDTO.ToEntity();
         if (tblChallanDTO.ChallanId == 0)
         {
             dbObject.tblChallans.Add(tblChallanObject);
             if (tblChallanDTO.ChallanEntryList != null)
             {
                 foreach (var ChallanEntry in tblChallanDTO.ChallanEntryList)
                 {
                     dbObject.tblChallanEntries.Add(ChallanEntry.ToEntity());
                 }
             }
         }
         else
         {
             tblChallanObject                                   = dbObject.tblChallans.Find(tblChallanDTO.ChallanId);
             tblChallanObject.ChallanNo                         = tblChallanDTO.ChallanNo;
             tblChallanObject.ChallanDateTime                   = tblChallanDTO.ChallanDateTime;
             tblChallanObject.VehicleNo                         = tblChallanDTO.VehicleNo;
             tblChallanObject.VehicleType                       = tblChallanDTO.VehicleType;
             tblChallanObject.VechicleMake                      = tblChallanDTO.VechicleMake;
             tblChallanObject.VehicleModel                      = tblChallanDTO.VehicleModel;
             tblChallanObject.VehicleNoOfPointLoading           = tblChallanDTO.VehicleNoOfPointLoading;
             tblChallanObject.Vehicle4NoOfPointUnLoading        = tblChallanDTO.Vehicle4NoOfPointUnLoading;
             tblChallanObject.VehicleFleetCode                  = tblChallanDTO.VehicleFleetCode;
             tblChallanObject.FromBrCode                        = tblChallanDTO.FromBrCode;
             tblChallanObject.LoadedForm                        = tblChallanDTO.LoadedForm;
             tblChallanObject.ToBrCode                          = tblChallanDTO.ToBrCode;
             tblChallanObject.Destination                       = tblChallanDTO.Destination;
             tblChallanObject.DistanceKM                        = tblChallanDTO.DistanceKM;
             tblChallanObject.ScheduleDateofActual              = tblChallanDTO.ScheduleDateofActual;
             tblChallanObject.VechicleEngineNo                  = tblChallanDTO.VechicleEngineNo;
             tblChallanObject.VechicleChassisNo                 = tblChallanDTO.VechicleChassisNo;
             tblChallanObject.DriverName                        = tblChallanDTO.DriverName;
             tblChallanObject.DriverMobileNo                    = tblChallanDTO.DriverMobileNo;
             tblChallanObject.DriverAddress                     = tblChallanDTO.DriverAddress;
             tblChallanObject.TaxTokenNo                        = tblChallanDTO.TaxTokenNo;
             tblChallanObject.TaxTokenNoValidUpto               = tblChallanDTO.TaxTokenNoValidUpto;
             tblChallanObject.TaxTokenNoIssuedFrom              = tblChallanDTO.TaxTokenNoIssuedFrom;
             tblChallanObject.DriverLicenseNo                   = tblChallanDTO.DriverLicenseNo;
             tblChallanObject.LicenseIssuedFrom                 = tblChallanDTO.LicenseIssuedFrom;
             tblChallanObject.LicenseValidUpto                  = tblChallanDTO.LicenseValidUpto;
             tblChallanObject.RoadPermitNo                      = tblChallanDTO.RoadPermitNo;
             tblChallanObject.RoadPermitValidUpto               = tblChallanDTO.RoadPermitValidUpto;
             tblChallanObject.VechicleOwnerName                 = tblChallanDTO.VechicleOwnerName;
             tblChallanObject.VechicleOwnerMobileNo             = tblChallanDTO.VechicleOwnerMobileNo;
             tblChallanObject.VechicleOwnerPanNo                = tblChallanDTO.VechicleOwnerPanNo;
             tblChallanObject.VechicleOwnerAddress              = tblChallanDTO.VechicleOwnerAddress;
             tblChallanObject.InsPolicyNo                       = tblChallanDTO.InsPolicyNo;
             tblChallanObject.InsCoWithStn                      = tblChallanDTO.InsCoWithStn;
             tblChallanObject.VechicleEngagedByNameWithEmpCode1 = tblChallanDTO.VechicleEngagedByNameWithEmpCode1;
             tblChallanObject.VechicleEngagedByNameWithEmpCode2 = tblChallanDTO.VechicleEngagedByNameWithEmpCode2;
             tblChallanObject.VechicleAgentName                 = tblChallanDTO.VechicleAgentName;
             tblChallanObject.VechicleMobileNo                  = tblChallanDTO.VechicleMobileNo;
             tblChallanObject.VechicleAgentAddress              = tblChallanDTO.VechicleAgentAddress;
             tblChallanObject.VechicleFinancierDetails          = tblChallanDTO.VechicleFinancierDetails;
             tblChallanObject.BrokerLoadingAdviceNoDate         = tblChallanDTO.BrokerLoadingAdviceNoDate;
             tblChallanObject.GrandTotalPKG                     = tblChallanDTO.GrandTotalPKG;
             tblChallanObject.GrandTotalKGS                     = tblChallanDTO.GrandTotalKGS;
             tblChallanObject.MaterialUnLoadingBy               = tblChallanDTO.MaterialUnLoadingBy;
             tblChallanObject.PayableTotalPackages              = tblChallanDTO.PayableTotalPackages;
             tblChallanObject.PayableChargedWeight              = tblChallanDTO.PayableChargedWeight;
             tblChallanObject.PayableRatePerTon                 = tblChallanDTO.PayableRatePerTon;
             tblChallanObject.TotalLorryHire                    = tblChallanDTO.TotalLorryHire;
             tblChallanObject.ITDSDeduction                     = tblChallanDTO.ITDSDeduction;
             tblChallanObject.PartyLorryHire                    = tblChallanDTO.PartyLorryHire;
             tblChallanObject.BalanceLorryHire                  = tblChallanDTO.BalanceLorryHire;
             List <tblChallanEntry> entry = new List <tblChallanEntry>();
             entry = dbObject.tblChallanEntries.Where(h => h.ChallanId == tblChallanDTO.ChallanId).ToList();
             foreach (var item in entry)
             {
                 dbObject.tblChallanEntries.Remove(item);
             }
             if (tblChallanDTO.ChallanEntryList != null)
             {
                 foreach (var billEntry in tblChallanDTO.ChallanEntryList)
                 {
                     billEntry.ChallanId = tblChallanDTO.ChallanId;
                     dbObject.tblChallanEntries.Add(billEntry.ToEntity());
                 }
             }
         }
         dbObject.SaveChanges();
         return(tblChallanObject.ChallanId);
     }
 }
 public static int Save(tblConsignmentNoteDTO tblConsignmentNoteDTO)
 {
     using (var dbObject = new BRCTransportDBEntities())
     {
         var tblConsignmentNoteObject = tblConsignmentNoteDTO.ToEntity();
         if (tblConsignmentNoteDTO.ConsignmentId == 0)
         {
             dbObject.tblConsignmentNotes.Add(tblConsignmentNoteObject);
         }
         else
         {
             tblConsignmentNoteObject = dbObject.tblConsignmentNotes.Find(tblConsignmentNoteDTO.ConsignmentId);
             tblConsignmentNoteObject.ConsignmentNoteNo        = tblConsignmentNoteDTO.ConsignmentNoteNo;
             tblConsignmentNoteObject.CompanyName              = tblConsignmentNoteDTO.CompanyName;
             tblConsignmentNoteObject.PolicyNo                 = tblConsignmentNoteDTO.PolicyNo;
             tblConsignmentNoteObject.CompanyDate              = tblConsignmentNoteDTO.CompanyDate;
             tblConsignmentNoteObject.CompanyAmount            = tblConsignmentNoteDTO.CompanyAmount;
             tblConsignmentNoteObject.CompanyPhone             = tblConsignmentNoteDTO.CompanyPhone;
             tblConsignmentNoteObject.ConsigneeId              = tblConsignmentNoteDTO.ConsigneeId;
             tblConsignmentNoteObject.ConsignorId              = tblConsignmentNoteDTO.ConsignorId;
             tblConsignmentNoteObject.ConsigneeInvoiceNo       = tblConsignmentNoteDTO.ConsigneeInvoiceNo;
             tblConsignmentNoteObject.ConsigneeServiceTaxRegNo = tblConsignmentNoteDTO.ConsigneeServiceTaxRegNo;
             tblConsignmentNoteObject.ConsignorPurchaseOrderNo = tblConsignmentNoteDTO.ConsignorPurchaseOrderNo;
             tblConsignmentNoteObject.ConsignorServiceTaxRegNo = tblConsignmentNoteDTO.ConsignorServiceTaxRegNo;
             tblConsignmentNoteObject.FromCode                 = tblConsignmentNoteDTO.FromCode;
             tblConsignmentNoteObject.ToCode                          = tblConsignmentNoteDTO.ToCode;
             tblConsignmentNoteObject.NoofPackages                    = tblConsignmentNoteDTO.NoofPackages;
             tblConsignmentNoteObject.MethodOfPacking                 = tblConsignmentNoteDTO.MethodOfPacking;
             tblConsignmentNoteObject.ActualWtInKGS                   = tblConsignmentNoteDTO.ActualWtInKGS;
             tblConsignmentNoteObject.CategoryOfLoad                  = tblConsignmentNoteDTO.CategoryOfLoad;
             tblConsignmentNoteObject.Rate                            = tblConsignmentNoteDTO.Rate;
             tblConsignmentNoteObject.LoadType                        = tblConsignmentNoteDTO.LoadType;
             tblConsignmentNoteObject.Distance                        = tblConsignmentNoteDTO.Distance;
             tblConsignmentNoteObject.KMS                             = tblConsignmentNoteDTO.KMS;
             tblConsignmentNoteObject.DescriptionSaidToContain        = tblConsignmentNoteDTO.DescriptionSaidToContain;
             tblConsignmentNoteObject.PrivateMarketOtherIdentificaion = tblConsignmentNoteDTO.PrivateMarketOtherIdentificaion;
             tblConsignmentNoteObject.BusinessType                    = tblConsignmentNoteDTO.BusinessType;
             tblConsignmentNoteObject.AdvancedPaymentMRNo             = tblConsignmentNoteDTO.AdvancedPaymentMRNo;
             tblConsignmentNoteObject.AdvancedPaymentDate             = tblConsignmentNoteDTO.AdvancedPaymentDate;
             tblConsignmentNoteObject.AdvancedPaymentAmount           = tblConsignmentNoteDTO.AdvancedPaymentAmount;
             tblConsignmentNoteObject.DimensionLength                 = tblConsignmentNoteDTO.DimensionLength;
             tblConsignmentNoteObject.DimensionWidth                  = tblConsignmentNoteDTO.DimensionWidth;
             tblConsignmentNoteObject.DimensionHeight                 = tblConsignmentNoteDTO.DimensionHeight;
             tblConsignmentNoteObject.DimensionNoOfPKGS               = tblConsignmentNoteDTO.DimensionNoOfPKGS;
             tblConsignmentNoteObject.DimensionTotalCFTCMT            = tblConsignmentNoteDTO.DimensionTotalCFTCMT;
             tblConsignmentNoteObject.DimensionSinglePieceWeight      = tblConsignmentNoteDTO.DimensionSinglePieceWeight;
             tblConsignmentNoteObject.DeclarationNo                   = tblConsignmentNoteDTO.DeclarationNo;
             tblConsignmentNoteObject.ValidUpto                       = tblConsignmentNoteDTO.ValidUpto;
             tblConsignmentNoteObject.DeclaredValueOfGoods            = tblConsignmentNoteDTO.DeclaredValueOfGoods;
             tblConsignmentNoteObject.BasicOfBooking                  = tblConsignmentNoteDTO.BasicOfBooking;
             tblConsignmentNoteObject.BilledWithMs                    = tblConsignmentNoteDTO.BilledWithMs;
             tblConsignmentNoteObject.BranchCode                      = tblConsignmentNoteDTO.BranchCode;
             tblConsignmentNoteObject.ToPay                           = tblConsignmentNoteDTO.ToPay;
             tblConsignmentNoteObject.Rebooking                       = tblConsignmentNoteDTO.Rebooking;
             tblConsignmentNoteObject.MainConsignmentNo               = tblConsignmentNoteDTO.MainConsignmentNo;
             tblConsignmentNoteObject.GoodRecievedDetails             = tblConsignmentNoteDTO.GoodRecievedDetails;
             tblConsignmentNoteObject.Charges1                        = tblConsignmentNoteDTO.Charges1;
             tblConsignmentNoteObject.Amount1                         = tblConsignmentNoteDTO.Amount1;
             tblConsignmentNoteObject.Charges2                        = tblConsignmentNoteDTO.Charges2;
             tblConsignmentNoteObject.Amount2                         = tblConsignmentNoteDTO.Amount2;
             tblConsignmentNoteObject.Charges3                        = tblConsignmentNoteDTO.Charges3;
             tblConsignmentNoteObject.Amount3                         = tblConsignmentNoteDTO.Amount3;
             tblConsignmentNoteObject.Charges4                        = tblConsignmentNoteDTO.Charges4;
             tblConsignmentNoteObject.Amount4                         = tblConsignmentNoteDTO.Amount4;
             tblConsignmentNoteObject.Charges5                        = tblConsignmentNoteDTO.Charges5;
             tblConsignmentNoteObject.Amount5                         = tblConsignmentNoteDTO.Amount5;
             tblConsignmentNoteObject.FinalAmount                     = tblConsignmentNoteDTO.FinalAmount;
             tblConsignmentNoteObject.ServiceTaxisPayableBy           = tblConsignmentNoteDTO.ServiceTaxisPayableBy;
             tblConsignmentNoteObject.FinalAmount                     = tblConsignmentNoteDTO.FinalAmount;
             tblConsignmentNoteObject.PanNo                           = tblConsignmentNoteDTO.PanNo;
             tblConsignmentNoteObject.PartyCode                       = tblConsignmentNoteDTO.PartyCode;
             tblConsignmentNoteObject.ServicetaxThrough               = tblConsignmentNoteDTO.ServicetaxThrough;
             tblConsignmentNoteObject.ValidType                       = tblConsignmentNoteDTO.ValidType;
             tblConsignmentNoteObject.PhoneNo                         = tblConsignmentNoteDTO.PhoneNo;
             tblConsignmentNoteObject.AddressofIssuing                = tblConsignmentNoteDTO.AddressofIssuing;
             tblConsignmentNoteObject.ConsignmentDate                 = tblConsignmentNoteDTO.ConsignmentDate;
             tblConsignmentNoteObject.CentralisedServiceTaxRegnNo     = tblConsignmentNoteDTO.CentralisedServiceTaxRegnNo;
         }
         dbObject.SaveChanges();
         return(tblConsignmentNoteObject.ConsignmentId);
     }
 }