// GET api/decisionstatus
 public IEnumerable<DecisionStatus> Get()
 {
     List<DecisionStatus> listDecisionStatus = new List<DecisionStatus>();
     DataView dvDecisionStatus = DecisionStatusBO.GetDecisionStatusIDForSync();
     foreach (DataRowView drvDecisionStatus in dvDecisionStatus)
     {
         DecisionStatus decisionStatus = new DecisionStatus();
         listDecisionStatus.Add(DecisionStatusBO.GetDecisionStatus(Convert.ToInt32(drvDecisionStatus["DecisionStatusID"])));
     }
     return listDecisionStatus;
 }
 // POST api/decisionstatus
 public DecisionStatus Post(DecisionStatus decisionStatus)
 {
     if (decisionStatus.GUID > 0)
     {
         decisionStatus.DecisionStatusID = decisionStatus.GUID;
         int rowResult = DecisionStatusBO.UpdateDecisionStatus(decisionStatus);
         //Return Back to The Client               
         return decisionStatus;
     }
     else
     { 
         int rowResult = DecisionStatusBO.InsertDecisionStatus(decisionStatus);
         //Return Back to The Client               
         return decisionStatus;
     }
 }
예제 #3
0
        public int InsertDecisionStatus(DecisionStatus objDecisionStatus)
        {
            objDecisionStatus.DecisionStatusID = 1;
            BeginTransaction();

            try
            {
                objDecisionStatus.DecisionStatusID = Insert(objDecisionStatus);
                CommitTransaction();
            }
            catch (Exception ex)
            {
                RollBackTransaction();
                objDecisionStatus.DecisionStatusID = -1;
            }

            return objDecisionStatus.DecisionStatusID;
        }
예제 #4
0
        public int DeleteDecisionStatus(DecisionStatus objDecisionStatus)
        {
            int rowsaffected = -1;
            BeginTransaction();
            try
            {
                String[] UpdateProperties = new String[] { "Status" };
                rowsaffected = Update(objDecisionStatus, UpdateProperties);

                CommitTransaction();
            }
            catch (Exception e)
            {
                RollBackTransaction();
                rowsaffected = -1;
            }
            return rowsaffected;

        }
예제 #5
0
 public static int DeleteDecisionStatus(DecisionStatus objDecisionStatus)
 {
     return new DecisionStatusDAO().DeleteDecisionStatus(objDecisionStatus);
 }
예제 #6
0
 public static int UpdateDecisionStatus(DecisionStatus objDecisionStatus)
 {
     return new DecisionStatusDAO().UpdateDecisionStatus(objDecisionStatus);
 }
예제 #7
0
 public static DecisionStatus GetDecisionStatus(int DecisionStatusID)
 {
     DecisionStatus objDecisionStatus = new DecisionStatus();
     return (DecisionStatus)(new DecisionStatusDAO().FillDTO(objDecisionStatus, "DecisionStatusID=" + DecisionStatusID));
 }
예제 #8
0
 public static int InsertDecisionStatus(DecisionStatus objDecisionStatus)
 {
     return new DecisionStatusDAO().InsertDecisionStatus(objDecisionStatus);
 }