Beispiel #1
0
        public void VerifyDBdata_Ed_CCds(string username, string orgid)
        {
            DBData_EdCCDsId = DBdata_Ed_CCDSId(username, Serial_Number, orgid);
            string DBEdid        = DBData_EdCCDsId.EdrefId;
            string DBCCdsrefId   = DBData_EdCCDsId.CCDSRefid;
            string DbStatus      = DBData_EdCCDsId.status;
            string Dbyear        = DBData_EdCCDsId.year;
            string DbVin         = DBData_EdCCDsId.VIN;
            string DbCatMakeCode = DBData_EdCCDsId.CATMakeCode;

            if (String.IsNullOrEmpty(DBData_EdCCDsId.DealerDescription) || String.IsNullOrEmpty(DBData_EdCCDsId.BusinessUnitDescription))
            {
                Assert.Fail("Dealer/Business Description are null value");
            }
            else
            {
                Assert.AreEqual(true, DBData_EdCCDsId.DealerDescription.Contains(Actual_Dealer), "dealer Description stored successfuly in DB");
                Assert.AreEqual(true, DBData_EdCCDsId.BusinessUnitDescription.Contains(Actual_BusinessUnit), "Business Unit stored successfuly in DB");
            }

            if (String.IsNullOrEmpty(DBEdid) || String.IsNullOrEmpty(DBCCdsrefId))
            {
                Assert.Fail("EdiD/CCDSRefID is not associated successfuly");
            }
            Assert.AreEqual(true, DbStatus, "3", "Status updated as 3  for registered Asset");
            Assert.AreEqual(true, Dbyear, Actual_Year, "Year is updated successfuly in DB");
            Assert.AreEqual(true, DbVin, Actual_VIN, "Vin is updated successfuly in DB");
            Assert.AreEqual(true, DbCatMakeCode, Actual_MakeCode, "Vin is updated successfuly in DB");
        }
Beispiel #2
0
        public DBData_ED_CCDSID DBdata_Ed_CCDSId(string username, string SerialNo, string OrganizationId)
        {
            //username = "******";
            //SerialNo = "A25F013057";
            //OrganizationId = "2772";
            try
            {
                sql.Open();
                string serviceprovider = @"select EdrefId,CCDSRefid,status,DealerDescription,BusinessUnitDescription,CATMakeCode,year,VIN from Serviceproviderdataasset where serialnumber = @Sno and ServiceProviderData_id in (select id from serviceproviderdata where UserName = @Uname and Organization_id = @OrgId)";
                DBData_EdCCDsId = sql.Query <DBData_ED_CCDSID>(serviceprovider, new { Uname = username, Sno = SerialNo, OrgId = OrganizationId }).FirstOrDefault();
            }
            catch (Exception e)
            {
            }
            finally
            {
                sql.Close();
            }

            return(DBData_EdCCDsId);
        }