コード例 #1
0
        public static TaskPeopleObject TaskPeopleRowToObject(DataRow taskPeople)
        {
            TaskPeopleObject obj = new TaskPeopleObject();

            try
            {
                if (taskPeople != null)
                {
                    obj.TpeopID  = RowFunctions.GetValueFromRowToGuid(taskPeople, TaskPeopleObject.TPEOP_ID, true, DataRowVersion.Current);
                    obj.Employee = EmployeeConvertor.EmployeeRowToObject(taskPeople, EmployeeObject.TABLE);
                    obj.Supplier = SupplierConvertor.SupplierRowToObject(taskPeople);
                    obj.Customer = CustomerConvertor.CustomerRowToObject(taskPeople);
                    obj.Unknown  = UnknownConvertor.UnknownRowToObject(taskPeople);
                    obj.Assignee = RowFunctions.GetValueFromRowToBoolean(taskPeople, TaskPeopleObject.ASSIGNEE, true, DataRowVersion.Current);
                    obj.Reporter = RowFunctions.GetValueFromRowToBoolean(taskPeople, TaskPeopleObject.REPORTER, true, DataRowVersion.Current);
                    obj.Task     = TaskConvertor.TaskRowToObject(taskPeople);
                    return(obj);
                }
                obj = null;
            }
            catch (System.Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
            return(obj);
        }
コード例 #2
0
        public UnknownObject GetUnknownByEmail(string email)
        {
            UnknownObject unknown = new UnknownObject();
            QueryBuilder  builder;

            try
            {
                builder = new QueryBuilder();
                builder.Append(this.BaseQuery(false, 0));
                builder.AppendWhereString(UnknownObject.EMAIL, email, QueryBuilder.ComparisonOperators.Equal, QueryBuilder.ParameterLocation.FIRST_LAST);

                DataSet result = this.ExecuteDataSet(builder.Query, false);
                if (result.Tables[0].Rows.Count > 0)
                {
                    unknown = UnknownConvertor.UnknownRowToObject(result.Tables[0].Rows[0]);
                }
                else
                {
                    return(null);
                }
            }
            catch (System.Exception exception1)
            {
                throw new Exception(MethodBase.GetCurrentMethod().Name, exception1);
            }
            return(unknown);
        }