示例#1
0
 public Cikk(int pCIKK_ID, string pMEGNEVEZES, int pCIKK_TIPUS, int pCIKKCSOPORT_ID)
 {
     fCIKK_ID = pCIKK_ID;
     fMEGNEVEZES = pMEGNEVEZES;
     fCIKK_TIPUS = pCIKK_TIPUS;
     fCIKKCSOPORT_ID = pCIKKCSOPORT_ID;
     CIKK_KISZERELES = new CikkKiszerelesList();//fCIKK_ID, new SqlConnection(DEFS.ConSTR));
     fAKTIV = 1;
     fVIRTUAL = 0;
     fCIKKSZAM = "";
     fGYORSKOD = "";
     fERT_TIP = "D";
     fEAN = "";
     fSZJ = "";
     fMEGJEGYZES = "";
     fMEGYS_ID = "1";
     fROVID_NEV = "";
 }
示例#2
0
        public Cikk(int pCikkId, bool ForEdit)
        {
            SqlConnection c = new SqlConnection(DEFS.ConSTR);
            if (c.State == ConnectionState.Closed) { c.Open(); }
            SqlCommand cmd = new SqlCommand { Connection = c,
                                 CommandType = CommandType.Text,
                                 CommandText = "SELECT CIKK_ID, MEGNEVEZES, CIKK_TIPUS, CIKKCSOPORT_ID, isnull(CIKKSZAM,'') as CIKKSZAM, isnull(OTHER_FILTER_ID,-1) as OTHER_FILTER_ID," + " isnull(DEFAULT_RAKTAR,-1) as DEFAULT_RAKTAR, isnull(ERTEKESITES_TIPUSA,'D') as ERT_TIPUS," + " isnull(GYORSKOD,'') as GYORSKOD , isnull(EAN_KOD,'') as EAN_KOD,isnull(SZJ_SZAM,'') as SZJ_SZAM , " + " isnull(MINIMUM_KESZLET,0) as MINIMUM_KESZLET , isnull(OPTIMALIS_KESZLET,0) as OPTIMALIS_KESZLET , isnull(ELADASI_AR,0) as ELADASI_AR , isnull(MEGJEGYZES,'') as MEGJEGYZES ,isnull(MEGYS_ID,-1) as MEGYS_ID,  " + " isnull(ELADASI_AR_NETTO,0) as ELADASI_AR_NETTO, isnull(dbo.fn_get_AfaSzaz(cikk_id),20) as AFA_SZAZ, " + " isnull(SPEC_ZARAS,0) as SPEC_ZARAS, isnull(AUTO_MEGRENDELO,0) as AUTO_MEGRENDELO, AKTIV, VIRTUAL, " + " isnull(CIKK_ROVID_NEV,'') as ROVID_NEV, CIKK_TOP_LIST, CIKKCSOP_PREFER " + " FROM CIKK WHERE CIKK_ID =" + pCikkId.ToString() };

            SqlDataReader rdr = cmd.ExecuteReader();
            while (rdr.Read())
            {
                #region Fill Fields
                fCIKK_ID = (int)rdr["CIKK_ID"];
                fMEGNEVEZES = (string)rdr["MEGNEVEZES"];
                fCIKK_TIPUS = (int)rdr["CIKK_TIPUS"];
                fCIKKCSOPORT_ID = (int)rdr["CIKKCSOPORT_ID"];
                fOTHER_FILTER_ID = (int)rdr["OTHER_FILTER_ID"];
                fDEFAULT_RAKTAR = (int)rdr["DEFAULT_RAKTAR"];
                MEGYS_ID = (string)rdr["MEGYS_ID"];
                ERTEKESITES_TIPUSA = (string)rdr["ERT_TIPUS"];
                CIKKSZAM = (string)rdr["CIKKSZAM"];
                GYORSKOD = (string)rdr["GYORSKOD"];
                EAN = (string)rdr["EAN_KOD"];
                SZJ = (string)rdr["SZJ_SZAM"];
                MEGJEGYZES = (string)rdr["MEGJEGYZES"];
                MINIMUM_KESZLET = (double)rdr["MINIMUM_KESZLET"];
                OPTIMALIS_KESZLET = (double)rdr["OPTIMALIS_KESZLET"];
                ELADASI_AR = (double)rdr["ELADASI_AR"];
                //NETTO_AR = (double)rdr["ELADASI_AR_NETTO"];
                AFA_SZAZ = (double)rdr["AFA_SZAZ"];
                fMEGKULONB_ZARAS = (int)rdr["SPEC_ZARAS"];
                fAUTO_MEGRENDELO = (int)rdr["AUTO_MEGRENDELO"];
                fAKTIV = (int)rdr["AKTIV"];
                fVIRTUAL = (int)rdr["VIRTUAL"];
                fROVID_NEV = (string)rdr["ROVID_NEV"];
                fCIKK_TOP_LIST = (int)rdr["CIKK_TOP_LIST"];
                fCIKKCSOP_PREFER = (int)rdr["CIKKCSOP_PREFER"];
                #endregion

            }
            getKeszlet();
            getBeszallitok();
            CIKK_KISZERELES = new CikkKiszerelesList(fCIKK_ID, new SqlConnection(DEFS.ConSTR));
            c.Close();
        }