コード例 #1
0
        public List<DelegationValueEntity> FindDelegationValueEntity(DelegationSearchCriteria objDelegationSearchCriteria)
        {
            int showActive = objDelegationSearchCriteria.IsShowActive ?1:0;

            List<DelegationValueEntity> lstDelegationValueEntity = new List<DelegationValueEntity>();

            DataTable dt = new DataTable();
            DbHelper helper = new DbHelper();
            DbCommand command = helper.BuildDbCommand("P_SS_DelegationValue_SEARCH");
            helper.AssignParameterValues(
                command,
                objDelegationSearchCriteria.DelegationFunctionId,
                objDelegationSearchCriteria.AdminNotes,
                showActive
                );
            Helper.Fill(dt, command);

            foreach (DataRow dr in dt.Rows)
            {
                DelegationValueEntity objDelegationValueEntity = new DelegationValueEntity();
                objDelegationValueEntity.DelegationValueId = Convert.ToInt32(dr["DelegationValueID"].ToString());
                objDelegationValueEntity.DelegationFunctionId = Convert.ToInt32(dr["DelegationFunctionID"].ToString());
                objDelegationValueEntity.DelegationFunctionName = dr["DelegationName"].ToString();
                objDelegationValueEntity.Branch = dr["Branch"].ToString();
                objDelegationValueEntity.Unit = dr["Unit"].ToString();
                objDelegationValueEntity.Subunit = dr["Subunit"].ToString();
                objDelegationValueEntity.Grade = dr["Grade"].ToString();
                objDelegationValueEntity.Act = dr["Act"].ToString();
                objDelegationValueEntity.DelegationValue = dr["DelegationValue"].ToString();
                objDelegationValueEntity.OperationalCondition = dr["OperationalConditions"].ToString();
                objDelegationValueEntity.PolicyValue = dr["PolicyValue"].ToString();
                objDelegationValueEntity.DelegationReference = dr["DelegationReference"].ToString();
                objDelegationValueEntity.StartDate = Convert.ToDateTime(dr["EffectiveStartDate"].ToString());
                objDelegationValueEntity.EndDate = Convert.ToDateTime(dr["EffectiveEndDate"].ToString());

                lstDelegationValueEntity.Add(objDelegationValueEntity);
            }

            return lstDelegationValueEntity;
        }
コード例 #2
0
        private DelegationSearchCriteria GetDelegationSearchCriteria()
        {
            DelegationSearchCriteria objDelegationSearchCriteria = new DelegationSearchCriteria();
            objDelegationSearchCriteria.DelegationFunctionId = Convert.ToInt32(cbdDelegationFunctions.SelectedItem.DataValue.ToString());
            objDelegationSearchCriteria.AdminNotes = txtSearchNotes.Text;
            objDelegationSearchCriteria.IsShowActive = chkbxShowActive.Checked;

            return objDelegationSearchCriteria;
        }
コード例 #3
0
 public List<DelegationValueEntity> FindDelegationValueEntity(DelegationSearchCriteria objDelegationSearchCriteria)
 {
     return _delegationServiceDA.FindDelegationValueEntity(objDelegationSearchCriteria);
 }