예제 #1
0
    public DiscountAuthorization(string clientID)
    {
        this._ID = clientID;
        DataTable discountData = DL_DiscountAuthorization.DiscountAuthorization(clientID);

        if (discountData == null)
        {
            this.IsValid = false;
        }
        else if (discountData.Rows.Count < 1)
        {
            this.IsValid = false;
        }
        else if (discountData.Rows.Count > 1)
        {
            this.IsValid = false;
        }
        else
        {
            this.IsValid = true;
            DataRow dr = discountData.Rows[0];
            this._accessionNumber = dr["ACCESSION"].ToString();
            this._account         = dr["CLIENTNUMBER"].ToString();
            this._discountCode    = dr["DISCOUNTCODE"].ToString();
            this._location        = dr["LOCATION"].ToString();
            this._clientLocation  = dr["CLIENTLOCATION"].ToString();
            this._authorization   = dr["AUTHORIZATIONNUMBER"].ToString();
            this._animalName      = dr["ANIMALNAME"].ToString();
            this._territory       = dr["TERRITORY"].ToString();
            this._addtestcode     = dr["ADDTESTCODE"].ToString();
            this._deletetestcode  = dr["DELTESTCODE"].ToString();
            this._amount          = dr["AMOUNT"].ToString();
            this._date            = dr["DATEOFAUTHORIZATION"].ToString();
            this._reason          = dr["REASON"].ToString();
            this._ir          = dr["INHOUSERESUB"].ToString();
            this._sex         = dr["SEX"].ToString();
            this._species     = dr["SPECIES"].ToString();
            this._sex         = dr["SEX"].ToString();
            this._ageDOB      = dr["AGEDOB"].ToString();
            this._collDate    = dr["COLLECTIONDATE"].ToString();
            this._collTime    = dr["COLLECTIONTIME"].ToString();
            this._testOrdered = dr["TESTORDEREDSTRING"].ToString();

            string[] arrClientRevenue = dr["ClientRevenue"].ToString().Split('^');

            this._revenueFirstMonth  = (arrClientRevenue[0].Length == 0 ? "0.00" : arrClientRevenue[0]);
            this._revenueSecondMonth = (arrClientRevenue[1].Length == 0 ? "0.00" : arrClientRevenue[1]);
            this._revenueThirdMonth  = (arrClientRevenue[2].Length == 0 ? "0.00" : arrClientRevenue[2]);
        }
    }
예제 #2
0
 public static String insertDiscountAuthorization(String ACCOUNT, String MNEMONIC, String CLIENTNAME, String ACCESSION, String TERRITORY, String ANIMALNAME, String DISCOUNTCODE, String ADDTESTCODE, String DELTESTCODE, String AMOUNT, String IHRESUB, String DATE, String LAB, String REASON, String USER)
 {
     return(DL_DiscountAuthorization.insertDiscountAuthorization(ACCOUNT, MNEMONIC, CLIENTNAME, ACCESSION, TERRITORY, ANIMALNAME, DISCOUNTCODE, ADDTESTCODE, DELTESTCODE, AMOUNT, IHRESUB, DATE, LAB, REASON, USER));
 }
예제 #3
0
    //public static DataTable getDiscountDetails(string ClientID, string accessionNumber)
    //{
    //    DataTable returnDataTable = new DataTable();
    //    returnDataTable = DL_DiscountAuthorization.getDiscountDetails(ClientID, accessionNumber);
    //    return returnDataTable;
    //}

    public static DataTable getDiscountDetails(string ClientID, string Accession, string IR, string Location, string AuthorizationNumber, string DateSentFrom, string DateSentTo, string Status, string Territory, string DiscountCode, string UID)
    {
        return(DL_DiscountAuthorization.getDiscountDetails(ClientID, Accession, IR, Location, AuthorizationNumber, DateSentFrom, DateSentTo, Status, Territory, DiscountCode, UID));
    }