Beispiel #1
0
 public bool Equals(OriginEnum obj)
 {
     if ((object)obj == null)
     {
         return(false);
     }
     return(StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value));
 }
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value == null)
            {
                return(null);
            }
            OriginEnum gender = (OriginEnum)value;

            return(((int)gender).ToString());
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="Receipt" /> class.
 /// </summary>
 /// <param name="id">証憑ID (required).</param>
 /// <param name="status">ステータス(unconfirmed:確認待ち、confirmed:確認済み、deleted:削除済み、ignored:無視) (required).</param>
 /// <param name="description">メモ.</param>
 /// <param name="mimeType">MIMEタイプ (required).</param>
 /// <param name="issueDate">発生日.</param>
 /// <param name="origin">アップロード元種別 (required).</param>
 /// <param name="createdAt">作成日時(ISO8601形式) (required).</param>
 /// <param name="fileSrc">ファイルのダウンロードURL(freeeにログインした状態でのみ閲覧可能です。) (required).</param>
 /// <param name="user">user (required).</param>
 public Receipt(int id = default(int), StatusEnum status = default(StatusEnum), string description = default(string), string mimeType = default(string), string issueDate = default(string), OriginEnum origin = default(OriginEnum), string createdAt = default(string), string fileSrc = default(string), ReceiptUser user = default(ReceiptUser))
 {
     this.Id     = id;
     this.Status = status;
     // to ensure "mimeType" is required (not null)
     this.MimeType = mimeType ?? throw new ArgumentNullException("mimeType is a required property for Receipt and cannot be null");;
     this.Origin   = origin;
     // to ensure "createdAt" is required (not null)
     this.CreatedAt = createdAt ?? throw new ArgumentNullException("createdAt is a required property for Receipt and cannot be null");;
     // to ensure "fileSrc" is required (not null)
     this.FileSrc = fileSrc ?? throw new ArgumentNullException("fileSrc is a required property for Receipt and cannot be null");;
     // to ensure "user" is required (not null)
     this.User        = user ?? throw new ArgumentNullException("user is a required property for Receipt and cannot be null");;
     this.Description = description;
     this.IssueDate   = issueDate;
 }
Beispiel #4
0
 public Origin GetOrigin(OriginEnum newOrigin)
 {
     switch(newOrigin){
     case OriginEnum.Egyptian:
         return Egyptian;
     case OriginEnum.Greek:
         return Greek;
     case OriginEnum.Hebrew:
         return Hebrew;
     case OriginEnum.Indian:
         return Indian;
     case OriginEnum.Romanian:
         return Romanian;
     default:
         return Human;
     }
 }
Beispiel #5
0
 private void RadioButton_origin_CheckedChanged(object sender, EventArgs e)
 {
     if (radioButton_front.Checked)
     {
         origin             = OriginEnum.Front;
         axisCenterFromRear = Constants.Lc * 2.0;
     }
     else if (radioButton_center.Checked)
     {
         origin             = OriginEnum.Center;
         axisCenterFromRear = Constants.Lc;
     }
     else if (radioButton_rear.Checked)
     {
         origin             = OriginEnum.Rear;
         axisCenterFromRear = 0.0;
     }
 }
Beispiel #6
0
    public Origin GetOrigin(OriginEnum newOrigin)
    {
        switch (newOrigin)
        {
        case OriginEnum.Egyptian:
            return(Egyptian);

        case OriginEnum.Greek:
            return(Greek);

        case OriginEnum.Hebrew:
            return(Hebrew);

        case OriginEnum.Indian:
            return(Indian);

        case OriginEnum.Romanian:
            return(Romanian);

        default:
            return(Human);
        }
    }
Beispiel #7
0
 public SyncDirectoryInfo(string name, string fullName, OriginEnum origin)
 {
     Name = name; FullName = fullName; Origin = origin;
 }
Beispiel #8
0
 public SyncFileDirName(string fullName, OriginEnum origin)
 {
     FullName = fullName; Origin = origin;
 }
Beispiel #9
0
 public SyncFileInfo(string name, string fullName, DateTime lastWriteTime, OriginEnum origin)
 {
     Name = name; FullName = fullName; LastWriteTime = lastWriteTime; Origin = origin;
 }
Beispiel #10
0
 public Origin(int x, int y)
 {
     X    = x;
     Y    = y;
     Enum = OriginEnum.Free;
 }
 public Reference(OriginEnum origin, string meaning, string name, string url)
     : this(name, url)
 {
     this.origin = origin;
     this.meaning = meaning;
 }
 public Reference(OriginEnum origin, string meaning, string name, string url) : this(name, url)
 {
     this.origin  = origin;
     this.meaning = meaning;
 }
Beispiel #13
0
        public void UpdateSheep(string breedId, GenderEnum gender, GrowthStageEnum growthStage, OriginEnum origin, float?birthWeight, int compatriotNumber, DateTime?birthDay, float?ablactationWeight, DateTime?ablactationDate, string fatherId, string motherId, string sheepfoldId, SheepStatusEnum sheepStatusEnum, string principalId, string remark, string id)
        {
            string sql = "update \"T_Sheep\"  set \"BreedId\"=:breedId,\"Gender\"=:gender,\"GrowthStage\"=:growthStage,\"SheepfoldId\"=:sheepfoldId,\"BirthWeight\"=:birthWeight,\"CompatriotNumber\"=:compatriotNumber,\"Birthday\"=:birthday,\"Origin\"=:origin, \"AblactationWeight\"=:ablactationWeight,\"AblactationDate\"=:ablactationDate,\"FatherId\"=:fatherId,\"MotherId\"=:motherId,\"Status\"=:status,\"PrincipalId\"=:principalId,\"Remark\"=:remark where \"Id\"=:id";

            IDbParameters pms = AdoTemplate.CreateDbParameters();

            pms.AddWithValue("breedId", breedId);
            pms.AddWithValue("gender", (int)gender);
            pms.AddWithValue("growthStage", (int)growthStage);
            pms.AddWithValue("sheepfoldId", sheepfoldId);
            pms.AddWithValue("birthWeight", birthWeight);
            pms.AddWithValue("compatriotNumber", compatriotNumber);
            pms.AddWithValue("birthday", birthDay);
            pms.AddWithValue("origin", (int)origin);
            pms.AddWithValue("ablactationWeight", ablactationWeight);
            pms.AddWithValue("ablactationDate", ablactationDate);
            pms.AddWithValue("fatherId", fatherId);
            pms.AddWithValue("motherId", motherId);
            pms.AddWithValue("status", (int)sheepStatusEnum);
            pms.AddWithValue("principalId", principalId);
            pms.AddWithValue("remark", remark);
            pms.AddWithValue("id", id);

            AdoTemplate.ExecuteNonQuery(CommandType.Text, sql, pms);
        }
Beispiel #14
0
        public void AddSheep(string id, string serialNumber, string breedId, GenderEnum gender, GrowthStageEnum growthStage, OriginEnum origin, float?birthWeight, int compatriotNumber, DateTime?birthDay, string fatherId, string motherId, string sheepfoldId, SheepStatusEnum sheepStatusEnum, string principalId, string operatorId, DateTime createTime, string remark, string buySource, decimal buyMoney, float?buyWeight, DateTime buyOperationDate, string buyPrincipalId, string buyRemark)
        {
            string sql = "INSERT into \"T_Sheep\" (\"Id\",\"SerialNumber\",\"BreedId\",\"Gender\",\"GrowthStage\",\"SheepfoldId\",\"BirthWeight\",\"CompatriotNumber\",\"Birthday\",\"Origin\",\"FatherId\",\"MotherId\",\"Status\",\"PrincipalId\",\"OperatorId\",\"CreateTime\",\"Remark\")VALUES(:id,:serialNumber,:breedId,:gender,:growthStage,:sheepfoldId,:birthWeight,:compatriotNumber,:birthday,:origin,:fatherId,:motherId,:status,:principalId,:operaterId,:createTime,:remark);INSERT into \"T_BuySheep\" (\"ExpenditureId\",\"SheepId\",\"Source\",\"Weight\")VALUES(:expenditureId,:sheepId,:source,:buyWeight);INSERT into \"T_Expenditure\" (\"Id\",\"Money\",\"OperationDate\",\"PrincipalId\",\"OperatorId\",\"CreateTime\",\"Remark\")VALUES(:exId,:money,:buyOperationDate,:buyPrincipalId,:buyOperatorId,:buyCreateTime,:buyRemark)";

            IDbParameters pms = AdoTemplate.CreateDbParameters();

            pms.AddWithValue("id", id);
            pms.AddWithValue("serialNumber", serialNumber);
            pms.AddWithValue("breedId", breedId);
            pms.AddWithValue("gender", (int)gender);
            pms.AddWithValue("growthStage", (int)growthStage);
            pms.AddWithValue("sheepfoldId", sheepfoldId);
            pms.AddWithValue("birthWeight", birthWeight);
            pms.AddWithValue("compatriotNumber", compatriotNumber);
            pms.AddWithValue("birthday", birthDay);
            pms.AddWithValue("origin", (int)origin);
            pms.AddWithValue("fatherId", fatherId);
            pms.AddWithValue("motherId", motherId);
            pms.AddWithValue("status", (int)sheepStatusEnum);
            pms.AddWithValue("principalId", principalId);
            pms.AddWithValue("operaterId", operatorId);
            pms.AddWithValue("createTime", createTime);
            pms.AddWithValue("remark", remark);

            string expenditureId = Guid.NewGuid().ToString();

            pms.AddWithValue("expenditureId", expenditureId);
            pms.AddWithValue("sheepId", id);
            pms.AddWithValue("source", buySource);
            pms.AddWithValue("buyWeight", buyWeight);

            pms.AddWithValue("exId", expenditureId);
            pms.AddWithValue("money", buyMoney);
            pms.AddWithValue("buyOperationDate", buyOperationDate);
            pms.AddWithValue("buyPrincipalId", buyPrincipalId);
            pms.AddWithValue("buyOperatorId", operatorId);
            pms.AddWithValue("buyCreateTime", createTime);
            pms.AddWithValue("buyRemark", buyRemark);

            AdoTemplate.ExecuteNonQuery(CommandType.Text, sql, pms);
        }