Exemple #1
0
        public static bool UpdateAvrech(Avrech avrech, int iUserId)
        {
            try
            {
                List <SqlParameter> parameters = ObjectGenerator <Avrech> .GetSqlParametersFromObject(avrech);

                parameters.Add(new SqlParameter("iUserId", iUserId));
                SqlDataAccess.ExecuteDatasetSP("TPerson_UPD", parameters);
                return(true);
            }
            catch (Exception ex)
            {
                Log.LogError("UpdateAvrech / TPerson_UPD", "ex" + ex);
                return(false);
            }
        }
Exemple #2
0
        public static Avrech GetAvrechById(int?iPersonId)
        {
            try
            {
                DataRow dr     = SqlDataAccess.ExecuteDatasetSP("TAvrech_GetAvrechById_SLCT", new SqlParameter("iPersonId", iPersonId)).Tables[0].Rows[0];
                Avrech  avrech = ObjectGenerator <Avrech> .GeneratFromDataRow(dr);

                avrech.lstObject = new Dictionary <string, string>();
                avrech.lstObject.Add("nvUserName", dr["nvUserName"].ToString());
                avrech.lstObject.Add("nvPassword", dr["nvPassword"].ToString());

                return(avrech);
            }
            catch (Exception ex)
            {
                Log.LogError("GetAvrechim / TAvrech_SLCT", ", ex " + ex);
                return(null);
            }
        }