Esempio n. 1
0
        public bool InsertData(string UserID, CustomerData cusData)
        {
            Boolean ret = true;
            CustomerDAL oDAL = new CustomerDAL();

            SetDataToDAL(oDAL, cusData);
            
            ret = oDAL.InsertCurrentData(UserID, null);

            if (ret == false)
                _error = oDAL.ErrorMessage;

            return ret;
        }
Esempio n. 2
0
        public bool UpdateData(string UserID, CustomerData cusData)
        {
            Boolean ret = true;
            CustomerDAL oDAL = new CustomerDAL();
            //double LOID = 0;

            //LOID = GetLOID(cusData.CODE);
            oDAL.GetDataByLOID(cusData.LOID, null);
            SetDataToDAL(oDAL, cusData);

            ret = oDAL.UpdateCurrentData(UserID, null);

            if (ret == false)
                _error = oDAL.ErrorMessage;

            return ret;
        }
Esempio n. 3
0
        public CustomerData GetCustomerData(double loid)
        {
            CustomerDAL dal = new CustomerDAL();
            CustomerData data = new CustomerData();
            dal.GetDataByLOID(loid, null);
            data.ACTIVE = dal.ACTIVE;
            data.BILLADDRESS = dal.BILLADDRESS;
            data.BILLAMPHUR = dal.BILLAMPHUR;
            data.BILLEMAIL = dal.BILLEMAIL;
            data.BILLFAX = dal.BILLFAX;
            data.BILLPROVINCE = dal.BILLPROVINCE;
            data.BILLROAD = dal.BILLROAD;
            data.BILLTAMBOL = dal.BILLTAMBOL;
            data.BILLTEL = dal.BILLTEL;
            data.BILLZIPCODE = dal.BILLZIPCODE;
            data.CADDRESS = dal.CADDRESS;
            data.CAMPHUR = dal.CAMPHUR;
            data.CEMAIL = dal.CEMAIL;
            data.CFAX = dal.CFAX;
            data.CLASTNAME = dal.CLASTNAME;
            data.CMOBILE = dal.CMOBILE;
            data.CNAME = dal.CNAME;
            data.CODE = dal.CODE;
            data.CPROVINCE = dal.CPROVINCE;
            data.CREDITAMOUNT = dal.CREDITAMOUNT;
            data.CREDITDAY = dal.CREDITDAY;
            data.CROAD = dal.CROAD;
            data.CTAMBOL = dal.CTAMBOL;
            data.CTEL = dal.CTEL;
            data.CTITLE = dal.CTITLE;
            data.CUSTOMERTYPE = dal.CUSTOMERTYPE;
            data.CZIPCODE = dal.CZIPCODE;
            data.DELIVERTYPE = dal.DELIVERTYPE;
            data.EFDATE = dal.EFDATE;
            data.EPDATE = dal.EPDATE;
            data.IDENTITY = dal.IDENTITY;
            data.LASTNAME = dal.LASTNAME;
            data.MEMBERTYPE = dal.MEMBERTYPE;
            data.NAME = dal.NAME;
            data.PAYMENT = dal.PAYMENT;
            data.REMARK = dal.REMARK;
            data.SENDADDRESS = dal.SENDADDRESS;
            data.SENDAMPHUR = dal.SENDAMPHUR;
            data.SENDEMAIL = dal.SENDEMAIL;
            data.SENDFAX = dal.SENDFAX;
            data.SENDPLACE = dal.SENDPLACE;
            data.SENDPROVINCE = dal.SENDPROVINCE;
            data.SENDROAD = dal.SENDROAD;
            data.SENDTAMBOL = dal.SENDTAMBOL;
            data.SENDTEL = dal.SENDTEL;
            data.SENDZIPCODE = dal.SENDZIPCODE;
            data.TITLE = dal.TITLE;

            return data;
        }
Esempio n. 4
0
        private void SetDataToDAL(CustomerDAL oDAL, CustomerData cusData)
        {
            oDAL.ACTIVE = "1";

            //-------------------- ª×èͺÃÔÉÑ·/ÅÙ¡¤éÒ ---------------------------------------
            oDAL.CODE = cusData.CODE;
            oDAL.CUSTOMERTYPE = cusData.CUSTOMERTYPE;
            oDAL.IDENTITY = cusData.IDENTITY;
            oDAL.TITLE = cusData.TITLE;
            oDAL.NAME = cusData.NAME;
            oDAL.LASTNAME = cusData.LASTNAME;
            oDAL.MEMBERTYPE = cusData.MEMBERTYPE;
            oDAL.EFDATE = cusData.EFDATE;
            oDAL.EPDATE = cusData.EPDATE;

            //-------------------- à§×è͹䢡ÒêÓÃÐà§Ô¹ ---------------------------------------
            oDAL.PAYMENT = cusData.PAYMENT;
            oDAL.CREDITDAY = cusData.CREDITDAY;
            oDAL.CREDITAMOUNT = cusData.CREDITAMOUNT;

            //-------------------- ·ÕèÍÂÙèºÃÔÉÑ·/ÅÙ¡¤éÒ/ÊÁÒªÔ¡ ---------------------------------------
            oDAL.BILLADDRESS = cusData.BILLADDRESS;
            oDAL.BILLROAD = cusData.BILLROAD;
            oDAL.BILLPROVINCE = cusData.BILLPROVINCE;
            oDAL.BILLAMPHUR = cusData.BILLAMPHUR;
            oDAL.BILLTAMBOL = cusData.BILLTAMBOL;
            oDAL.BILLZIPCODE = cusData.BILLZIPCODE;
            oDAL.BILLTEL = cusData.BILLTEL;
            oDAL.BILLFAX = cusData.BILLFAX;
            oDAL.BILLEMAIL = cusData.BILLEMAIL;

            //-------------------- ª×èͼÙéµÔ´µèÍ ---------------------------------------
            oDAL.CTITLE = cusData.CTITLE;
            oDAL.CNAME = cusData.CNAME;
            oDAL.CLASTNAME = cusData.CLASTNAME;
            oDAL.CTEL = cusData.CTEL;
            oDAL.CMOBILE = cusData.CMOBILE;
            oDAL.CEMAIL = cusData.CEMAIL;
            oDAL.CADDRESS = cusData.CADDRESS;
            oDAL.CROAD = cusData.CROAD;
            oDAL.CPROVINCE = cusData.CPROVINCE;
            oDAL.CAMPHUR = cusData.CAMPHUR;
            oDAL.CTAMBOL = cusData.CTAMBOL;
            oDAL.CZIPCODE = cusData.CZIPCODE;

            //-------------------- ʶҹ·ÕèÊè§ÊÔ¹¤éÒ ---------------------------------------
            oDAL.SENDPLACE = cusData.SENDPLACE;
            oDAL.DELIVERTYPE = cusData.DELIVERTYPE;
            oDAL.SENDADDRESS = cusData.SENDADDRESS;
            oDAL.SENDROAD = cusData.SENDROAD;
            oDAL.SENDPROVINCE = cusData.SENDPROVINCE;
            oDAL.SENDAMPHUR = cusData.SENDAMPHUR;
            oDAL.SENDTAMBOL = cusData.SENDTAMBOL;
            oDAL.SENDZIPCODE = cusData.SENDZIPCODE;
            oDAL.SENDTEL = cusData.SENDTEL;
            oDAL.SENDFAX = cusData.SENDFAX;
            oDAL.SENDEMAIL = cusData.SENDEMAIL;

            //-------------------- ËÁÒÂà赯 ---------------------------------------
            oDAL.REMARK = cusData.REMARK;
        }