Пример #1
0
 public Issue(CRMDataset.IssueTableRow issue)
 {
     //Constructor
     try {
         if (issue != null)
         {
             if (!issue.IsIDNull())
             {
                 this._id = issue.ID;
             }
             if (!issue.IsTypeIDNull())
             {
                 this._typeid = issue.TypeID;
             }
             if (!issue.IsTypeNull())
             {
                 this._type = issue.Type;
             }
             if (!issue.IsSubjectNull())
             {
                 this._subject = issue.Subject.Trim();
             }
             if (!issue.IsContactNull())
             {
                 this._contact = issue.Contact;
             }
             if (!issue.IsCompanyIDNull())
             {
                 this._companyid = issue.CompanyID;
             }
             if (!issue.IsCompanyNameNull())
             {
                 this._companyname = issue.CompanyName;
             }
             if (!issue.IsRegionNumberNull())
             {
                 this._regionnumber = issue.RegionNumber.Trim();
             }
             if (!issue.IsDistrictNumberNull())
             {
                 this._districtnumber = issue.DistrictNumber.Trim();
             }
             if (!issue.IsAgentNumberNull())
             {
                 this._agentnumber = issue.AgentNumber.Trim();
             }
             if (!issue.IsStoreNumberNull())
             {
                 this._storenumber = issue.StoreNumber;
             }
             if (!issue.IsFirstActionIDNull())
             {
                 this._firstactionid = issue.FirstActionID;
             }
             if (!issue.IsFirstActionDescriptionNull())
             {
                 this._firstactiondescription = issue.FirstActionDescription;
             }
             if (!issue.IsFirstActionUserIDNull())
             {
                 this._firstactionuserid = issue.FirstActionUserID;
             }
             if (!issue.IsFirstActionCreatedNull())
             {
                 this._firstactioncreated = issue.FirstActionCreated;
             }
             if (!issue.IsLastActionIDNull())
             {
                 this._lastactionid = issue.LastActionID;
             }
             if (!issue.IsLastActionDescriptionNull())
             {
                 this._lastactiondescription = issue.LastActionDescription;
             }
             if (!issue.IsLastActionUserIDNull())
             {
                 this._lastactionuserid = issue.LastActionUserID;
             }
             if (!issue.IsLastActionCreatedNull())
             {
                 this._lastactioncreated = issue.LastActionCreated;
             }
             if (!issue.IsZoneNull())
             {
                 this._zone = issue.Zone;
             }
             if (!issue.IsCoordinatorNull())
             {
                 this._coordinator = issue.Coordinator;
             }
         }
     }
     catch (Exception ex) { throw new ApplicationException("Unexpected error while creating new Issue instance", ex); }
 }