public int GetBy_BatchActivity_Count(string PRPDBatchID, long ActID, PRPDBatchActivity.ActStatus ActStatus) { try { SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@ActStatus", ActStatus), new SqlParameter("@ActID", ActID), new SqlParameter("@PRPDBatchID", PRPDBatchID), }; return(Execute.RunSP_Output(Connection, "SPGET_PRPDBatchActivityByActStatus_Count", paramList)); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }
public System.Data.DataTable GetDataByStatus(string PRPDBatchID, long ActID, PRPDBatchActivity.ActStatus ActStatus) { try { SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@ActStatus", ActStatus), new SqlParameter("@MainActID", ActID), new SqlParameter("@PRPDBatchID", PRPDBatchID) }; return(Execute.RunSP_DataTable(Connection, "SPGET_PRPDBatchActivityByStatus", paramList)); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }
public PRPDBatchActivity Get(string PRPDBatchID, long MainActID, PRPDBatchActivity.ActStatus ActState) { try { SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@ActStatus", ActState), new SqlParameter("@MainActID", MainActID), new SqlParameter("@PRPDBatchID", PRPDBatchID) }; DataTable dt = Execute.RunSP_DataTable(Connection, "SPGET_PRPDBatchActivityByStatus", paramList); PRPDBatchActivity obj = new PRPDBatchActivity(); if (dt.Rows.Count > 0) { obj.PRPDBatchActivityID = Convert.ToInt64(dt.Rows[0]["PRPDBatchActivity"]); obj.PRPDBatchID = Convert.ToString(dt.Rows[0]["PRPDBatchID"]); obj.MainActID = Convert.ToInt64(dt.Rows[0]["MainActID"]); obj.StartedDate = Convert.ToDateTime(dt.Rows[0]["StartedDate"]); if (dt.Rows[0]["EndDate"] != DBNull.Value) { obj.EndDate = Convert.ToDateTime(dt.Rows[0]["EndDate"]); } obj.SupervisedBy = objEmployee_DL.Get(Convert.ToString(dt.Rows[0]["SupervisedBy"])); obj.Comments = Convert.ToString(dt.Rows[0]["Comments"]); obj.State = (PRPDBatchActivity.ActStatus)Enum.Parse(typeof(PRPDBatchActivity.ActStatus), Convert.ToString(dt.Rows[0]["ActStatus"])); obj.SectionOverHeadRate = Convert.ToDecimal(dt.Rows[0]["SectionOverHeadRate"]); obj.StartQty = Convert.ToDecimal(dt.Rows[0]["@StartQty"]); if (dt.Rows[0]["StopQty"] != DBNull.Value) { obj.StopQty = Convert.ToDecimal(dt.Rows[0]["StopQty"]); } } return(obj); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }
public int ActivityCount(String PRPDBatchID, PRPDBatchActivity.ActStatus Status) { try { SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@PRPDBatchID", PRPDBatchID), new SqlParameter("@ActStatus", Status), new SqlParameter("@outParam", SqlDbType.Int) { Direction = ParameterDirection.Output } }; return(Execute.RunSP_Output(Connection, "SPGET_PRPDBatchActivity_Count_By_BatchID", paramList)); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }