예제 #1
0
파일: Line.cs 프로젝트: Shahafd/Cn.Server
 public Line(string ClientID, string Number, LineStatusEnum Status, int PackageID, int EmployeeID)
 {
     this.ClientID   = ClientID;
     this.Number     = Number;
     this.Status     = Status;
     this.PackageID  = PackageID;
     this.EmployeeID = EmployeeID;
     DateAdded       = DateTime.Now;
 }
예제 #2
0
 private void GetLineStatus()
 {
     //gets the status of the slected line into the line status enum
     if (!string.IsNullOrEmpty(SelectedLine))
     {
         Tuple <object, HttpStatusCode> returnTuple = httpClient.PostRequest(ApiConfigs.GetLineStatusRoute, SelectedLine);
         if (returnTuple.Item2 == HttpStatusCode.OK)
         {
             LineStatusEnum status = (LineStatusEnum)Enum.ToObject(typeof(LineStatusEnum), returnTuple.Item1);
             LineStatus = status;
         }
         else
         {
             logger.Print($"{returnTuple.Item2.ToString()} Error.");
         }
     }
 }