Beispiel #1
0
        /// <summary>
        /// Converts the specified list from an a list of cookie class instances into a list of ADO.NET data entities
        /// </summary>
        /// <param name="data">The list of cookie classes to convert.</param>
        /// <returns>A list of data entities.</returns>
        public static List<JobControl> ConvertFromCartClass(List<JobTypeControlCookie> data)
        {
            List<JobControl> returnData = new List<JobControl>();
            JobControl item = new JobControl();

            foreach (JobTypeControlCookie c in data)
            {
                item = new JobControl();
                item.JobControlID = c.JobControlID;
                item.ControlName = c.ControlName;
                item.JobControlTypeID = Brentwood.GetJobControlTypeByName(c.JobControlTypeName).JobControlTypeID;

                returnData.Add(item);
            }

            return returnData;
        }
 /// <summary>
 /// Create a new JobControl object.
 /// </summary>
 /// <param name="jobControlID">Initial value of the JobControlID property.</param>
 /// <param name="controlName">Initial value of the ControlName property.</param>
 /// <param name="jobControlTypeID">Initial value of the JobControlTypeID property.</param>
 /// <param name="jobTypeID">Initial value of the JobTypeID property.</param>
 public static JobControl CreateJobControl(global::System.Int32 jobControlID, global::System.String controlName, global::System.Int32 jobControlTypeID, global::System.Int32 jobTypeID)
 {
     JobControl jobControl = new JobControl();
     jobControl.JobControlID = jobControlID;
     jobControl.ControlName = controlName;
     jobControl.JobControlTypeID = jobControlTypeID;
     jobControl.JobTypeID = jobTypeID;
     return jobControl;
 }
Beispiel #3
0
 public static int AddJobControl(JobControl item, int jobTypeID)
 {
     int? rval = (new Entities()).JobControl_Insert(item.ControlName,
         item.JobControlID, jobTypeID).FirstOrDefault();
     return rval ?? default(int);
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the JobControls EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToJobControls(JobControl jobControl)
 {
     base.AddObject("JobControls", jobControl);
 }
Beispiel #5
0
 public static void UpdateJobControl(JobControl item)
 {
     int? rval = (new Entities()).JobControl_Update(item.JobControlID, item.ControlName,
         item.JobControlID).FirstOrDefault();
 }