Esempio n. 1
0
        public clsClearficationMCData GetClearification(string MCID)
        {
            DataSet ds = new DataSet();
            clsClearficationMCProperties        OBjProp = new clsClearficationMCProperties();
            clsClearficationMCData              Records = new clsClearficationMCData();
            List <clsClearficationMCProperties> data    = new List <clsClearficationMCProperties>();

            try
            {
                SqlParameter[] param = new SqlParameter[]
                {
                    //
                    //   new SqlParameter("@AgencyName",AgencyID)
                    new SqlParameter("@MCID", MCID)
                };
                dataAcess = new SqlDataAccess(clsConstant.DBCONSTRING);
                if (dataAcess.Connection.State == ConnectionState.Closed)
                {
                    dataAcess.Connection.Open();
                }
                //
                // ds = dataAcess.ExecuteDataSetQuery(clsConstant.SP_GetAgencyWiseName, CommandType.StoredProcedure, param);
                ds = dataAcess.ExecuteDataSetQuery(clsConstant.SP_SelectConfirmation, CommandType.StoredProcedure, param);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow row in ds.Tables[0].Rows)
                    {
                        OBjProp             = new clsClearficationMCProperties();
                        OBjProp.UserName    = row[0].ToString();
                        OBjProp.Description = row[1].ToString();
                        OBjProp.CommentID   = row[2].ToString();
                        data.Add(OBjProp);
                    }
                }
                Records.Records = data;
                dataAcess.Connection.Close();  //close connection
                return(Records);
            }
            catch
            {
                return(Records);
            }
        }
Esempio n. 2
0
 public void InsertComment(clsClearficationMCProperties PropObj)
 {
     try
     {
         SqlParameter[] param = new SqlParameter[]
         {
             new SqlParameter("@MCID", PropObj.MCID)
         };
         dataAcess = new SqlDataAccess(clsConstant.DBCONSTRING);
         if (dataAcess.Connection.State == ConnectionState.Closed)
         {
             dataAcess.Connection.Open();
         }
         //
         // ds = dataAcess.ExecuteDataSetQuery(clsConstant.SP_GetAgencyWiseName, CommandType.StoredProcedure, param);
         dataAcess.ExecuteNonQuery("UpdateConfirmationStatus", CommandType.StoredProcedure, param);
     }
     catch
     {
     }
 }