Click here to Skip to main content
15,908,931 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have this class:

SQL
namespace TCSCloud.Domain.RepairOrder.Model
{
    public class UpdateRepairOrder : Base.Base
    {
        public DateTime CreateDate { get; set; }
        public string CreateUser { get; set; }
        public DateTime LastUpdateDate { get; set; }
        public string LastUpdateUser { get; set; }
        public int TenId { get; set; }
        public int WorordId { get; set; } // Primary Key
        public string EstimateNumber { get; set; }
        public string WoNumber { get; set; }
        public string WoSource { get; set; }
        public string ReferenceNumber { get; set; }
        public string PoNumber { get; set; }
        public int CusId { get; set; }
        public int CusIdInvoiceTo { get; set; }
        public int CusIdWo { get; set; }
        public string CustomerName { get; set; }
        public string ContactName { get; set; }
        public string WoLocation { get; set; }
        public int CuslocId { get; set; }
        public int WorordtypId { get; set; }
        public int WorordcatId { get; set; }
        public int WorordunistaId { get; set; }
        public int ShosupId { get; set; }
        public int FacId { get; set; }
        public int WarId { get; set; }
        public int UniId { get; set; }
        public int ReeId { get; set; }
        public int OtReading { get; set; }
        public int RtReading { get; set; }
        public int HuboReading { get; set; }
        public string HuboReadingUom { get; set; }
        public string EstimateFlag { get; set; }
        public DateTime EstimateDate { get; set; }
        public DateTime EstimateCompleteDate { get; set; }
        public DateTime EstimateIntApprovedDate { get; set; }
        public DateTime EstimateCustomerHoldDate { get; set; }
        public DateTime EstimateCustApprovedDate { get; set; }
        public string EstimateNotes { get; set; }
        public DateTime WoDate { get; set; }
        public DateTime Completed_date { get; set; }
        public DateTime ApprovedDate { get; set; }
        public DateTime TransmitTimestamp { get; set; }
        public DateTime VoidDate { get; set; }
        public int TotalLabour { get; set; }
        public int TotalParts { get; set; }
        public int TotalShopsupply { get; set; }
        public int TotalSurcharge { get; set; }
        public int TotalTax { get; set; }
        public string Notes { get; set; }
        public string SystemNotes { get; set; }
        public string MobileNotes { get; set; }
        public string VoidNotes { get; set; }
        public int UseIdPreparedDy { get; set; }
        public int UseIdApprovedBy { get; set; }
        public int UseIdVoidedBy { get; set; }
        public string WoWsStatus { get; set; }
        public string UnitNumber { get; set; }
        public string UnitLicensePlate { get; set; }
        public string UnitSerialVin { get; set; }
        public string UnitReeferNumber { get; set; }
        public int UnitUnimakId { get; set; }
        public int UnitUnimodId { get; set; }
        public string UnitNotes { get; set; }
        public string CertificateLetter { get; set; }
        public int CertificateNumber { get; set; }
        public DateTime CertificateDate { get; set; }
        public string CertificateOther { get; set; }
        public string LastInsertUsername { get; set; }
        public string LastUpdateUsername { get; set; }
        public DateTime LastInsertDate { get; set; }
    }
}


I added its namespace as dll in "RepairOrderModel.cs",

C#
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TCSCloud.Domain.RepairOrder;
using TCSCloud.Domain.RepairOrder.Model;

namespace TCSCloud.Domain.RepairOrderManagement.Model
{
    public class RepairOrderModel
    {
        UpdateRepairOrder UpRepOrd = new UpdateRepairOrder();
    }
}


now i want to write some logic to update (Update Query) all values of "UpdateRepairOrder" in RepairOrderModel but couldn't find out the way, so how ? even with dummy values ? via linq to sql ? or anything ?
Posted
Comments
Ramug10 7-Mar-14 2:55am    
you can access all your UpdateRepairOrder class properties through object of this class right.Here you created object for that class then you can access update properties through UpRepOrd.
What is your problem???
Hunain Hafeez 7-Mar-14 3:03am    
when i use UpRepOrd.Notes= "ll"; then it says UpRepOrd is a field but used like type

1 solution

Add a method for RepairOrderModel class then you can update the object in that method.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900