private Candidate getCandidateFromDataRow(DataRow dr, DeliveryUnit deliveryUnit, CandidateRole candidateRole, Project currentProject, List <Evaluation> evaluations)
        {
            Candidate res = null;

            string pictureFullUrl = getPictureFromDB(dr.Db2String("Picture"));

            res = new Candidate()
            {
                Id                 = dr.Db2Int("Id"),
                DeliveryUnitId     = dr.Db2Int("DeliveryUnitId"),
                DeliveryUnit       = deliveryUnit,
                RelationType       = (CandidateRelationType)dr.Db2Int("RelationType"),
                FirstName          = dr.Db2String("FirstName"),
                LastName           = dr.Db2String("LastName"),
                CandidateRoleId    = dr.Db2Int("CandidateRoleId"),
                CandidateRole      = candidateRole,
                DocType            = (DocumentType?)dr.Db2NullableInt("DocType"),
                DocNumber          = dr.Db2String("DocNumber"),
                EmployeeNumber     = dr.Db2NullableInt("EmployeeNumber"),
                InBench            = dr.Db2Bool("InBench"),
                Picture            = pictureFullUrl,
                IsActive           = dr.Db2Bool("IsActive"),
                Grade              = (CandidateGrade?)dr.Db2NullableInt("Grade"),
                CurrentProjectId   = dr.Db2NullableInt("CurrentProjectId"),
                CurrentProjectJoin = dr.Db2NullableDateTime("CurrentProjectJoin"),

                CurrentProject = currentProject,
                Evaluations    = evaluations,
            };

            return(res);
        }
        private DeliveryUnit getDeliveryUnitFromDataRow(DataRow dr, Region region)
        {
            DeliveryUnit res = null;

            res = new DeliveryUnit()
            {
                Id       = dr.Db2Int("Id"),
                Code     = dr.Db2String("Code"),
                Name     = dr.Db2String("Name"),
                RegionId = dr.Db2Int("RegionId"),
                Region   = region,
            };

            return(res);
        }
Esempio n. 3
0
        public DeliveryTemplate ConvertUnitType(DeliveryTemplate template, DeliveryUnit unitType)
        {
            //更新配送单位
            double newUnit = 0;

            switch (unitType)
            {
            case DeliveryUnit.件数:
                newUnit = 0.001;
                break;

            case DeliveryUnit.重量:
                newUnit = 1000;
                break;

            default:
                break;
            }
            template.Base  = (int)Math.Floor(template.Base * newUnit);
            template.Extra = (int)Math.Floor(template.Extra * newUnit);
            return(template);
        }
Esempio n. 4
0
 /// <summary>
 /// 納期情報を設定
 /// </summary>
 /// <param name="no">数日、週数、月数</param>
 /// <param name="unit">
 /// 単位指定
 /// 日、週、月
 /// </param>
 public void SetDeliveryDate(double no, DeliveryUnit unit)
 {
     File.DeliveryDate.No   = no;
     File.DeliveryDate.Unit = unit;
 }
Esempio n. 5
0
 /// <summary>
 /// 納期情報を設定
 /// </summary>
 /// <param name="no">数日、週数、月数</param>
 /// <param name="unit">
 /// 単位指定
 /// 日、週、月
 /// </param>
 public void SetDeliveryDate(double no, DeliveryUnit unit)
 {
     _Model?.SetDeliveryDate(no, unit);
     CallPropertyChanged(nameof(DeliveryDate));
 }