示例#1
0
            public IList<CustomerListForDisplay> CustomerListDisplayAdvance(string paramCategory) //List of customers 
            {
             
               
                string SQL_str = "Select id" +
                                  ",iCustid" +
                                  ",vCustName" +
                                  ",vCustContactNme" +
                                  ",vCustPrimaryPh" +
                                  ",vCustPhone2" +
                                  ",vCustPhone3" +
                                  ",vCustPhone4" +
                                  ",vCustFax1" +
                                  ",vCustFax2" +
                                  ",vCustEmail" +
                                  ",vCustAddress1" +
                                  ",vCustAddress2" +
                                  ",vCustCity" +
                                  ",vCustState" +
                                  ",vCustCountry" +
                                  ",vCustZipCode" +
                                  ",vCustBillAddress1" +
                                  ",vCustBillAddress2" +
                                  ",vCustBillCity" +
                                  ",vCustBillCountry" +
                                  ",vCustBillZipCode" +
                                  ",vCustShipAddress1" +
                                  ",vCustShipAddress2" +
                                  ",vCustShipCity" +
                                  ",vCustShipState" +
                                  ",vCustShipCountry" +
                                  ",vCustShipZipCode" +
                                  ",vCustAccountNum" +
                                  ",vCustNote1" +
                                  ",vCustNote2" +
                                  ",vCustNote3" +
                                  ",vCustCategory" +
                                  ",vCustComments" +
                                  ",vCustStatus" +
                                  ",vEntryBy" +
                                  ",tTimestamp" +
                                  ",POS_Setup_Id" +
                                    " FROM POS_Customer" ;


                //Connect to database and retrieve
                CustomerListForDisplay Obj = new CustomerListForDisplay();
                IList<CustomerListForDisplay> ALLcustomers;
                SqlCEDataAccess POSdbAccess = new SqlCEDataAccess();
                ALLcustomers = POSdbAccess.connection.ConvertSqlQueryToIList(Obj, SQL_str);

                return ALLcustomers;


            }
示例#2
0
        public bool CustomerUpdate(CustomerListForDisplay InputRecordObj) //Update Customer 
        {
            string _vItemStatus = "Publish";
            string SQL_str = "Update POS_Customer set " +
                                  "[vCustName]=@vCustName" +
                                  ",[vCustContactNme]=@vCustContactNme" +
                                  ",[vCustPrimaryPh]=@vCustPrimaryPh" +
                                  ",[vCustPhone2]=@vCustPhone2" +
                                  ",[vCustPhone3]=@vCustPhone3" +
                                  ",[vCustPhone4]=@vCustPhone4" +
                                  ",[vCustFax1]=@vCustFax1" +
                                  ",[vCustFax2]=@vCustFax2" +
                                  ",[vCustEmail]=@vCustEmail" +
                                  ",[vCustAddress1]=@vCustAddress1" +
                                  ",[vCustAddress2]=@vCustAddress2" +
                                  ",[vCustCity]=@vCustCity" +
                                  ",[vCustState]=@vCustState" +
                                  ",[vCustCountry]=@vCustCountry" +
                                  ",[vCustZipCode]=@vCustZipCode" +
                                  ",[vCustBillAddress1]=@vCustBillAddress1" +
                                  ",[vCustBillAddress2]=@vCustBillAddress2" +
                                  ",[vCustBillCity]=@vCustBillCity" +
                                  ",[vCustBillCountry]=@vCustBillCountry" +
                                  ",[vCustBillZipCode]=@vCustBillZipCode" +
                                  ",[vCustShipAddress1]=@vCustShipAddress1" +
                                  ",[vCustShipAddress2]=@vCustShipAddress2" +
                                  ",[vCustShipCity]=@vCustShipCity" +
                                  ",[vCustShipState]=@vCustShipState" +
                                  ",[vCustShipCountry]=@vCustShipCountry" +
                                  ",[vCustShipZipCode]=@vCustShipZipCode" +
                                  ",[vCustAccountNum]=@vCustAccountNum" +
                                  ",[vCustNote1]=@vCustNote1" +
                                  ",[vCustNote2]=@vCustNote2" +
                                  ",[vCustNote3]=@vCustNote3" +
                                  ",[vCustCategory]=@vCustCategory" +
                                  ",[vCustComments]=@vCustComments" +
                                  ",[vCustStatus]=@vCustStatus" +
                                  ",[vEntryBy]=@vEntryBy" +
                                  ",[tTimestamp]=@tTimestamp" +
                                   " Where id = " + InputRecordObj.Id;
            //Connect to database and retrieve
            SqlCEDataAccess POSdbAccess = new SqlCEDataAccess();
            

            POSdbAccess.connection.Execute(SQL_str, new {InputRecordObj.vCustName
               ,InputRecordObj.iCustid
                                  ,
                 
                InputRecordObj.vCustContactNme
                                  ,
                InputRecordObj.vCustPrimaryPh
                                  ,
                InputRecordObj.vCustPhone2
                                  ,
                InputRecordObj.vCustPhone3
                                  ,
                InputRecordObj.vCustPhone4
                                  ,
                InputRecordObj.vCustFax1
                                  ,
                InputRecordObj.vCustFax2
                                  ,
                InputRecordObj.vCustEmail
                                  ,
                InputRecordObj.vCustAddress1
                                  ,
                InputRecordObj.vCustAddress2
                                  ,
                InputRecordObj.vCustCity
                                  ,
                InputRecordObj.vCustState
                                  ,
                InputRecordObj.vCustCountry
                                  ,
                InputRecordObj.vCustZipCode
                                  ,
                InputRecordObj.vCustBillAddress1
                                  ,
                InputRecordObj.vCustBillAddress2
                                  ,
                InputRecordObj.vCustBillCity
                                  ,
                InputRecordObj.vCustBillCountry
                                  ,
                InputRecordObj.vCustBillZipCode
                                  ,
                InputRecordObj.vCustShipAddress1
                                  ,
                InputRecordObj.vCustShipAddress2
                                  ,
                InputRecordObj.vCustShipCity
                                  ,
                InputRecordObj.vCustShipState
                                  ,
                InputRecordObj.vCustShipCountry
                                  ,
                InputRecordObj.vCustShipZipCode
                                  ,
                InputRecordObj.vCustAccountNum
                                  ,
                InputRecordObj.vCustNote1
                                  ,
                InputRecordObj.vCustNote2
                                  ,
                InputRecordObj.vCustNote3
                                  ,
                InputRecordObj.vCustCategory
                                  ,
                InputRecordObj.vCustComments
                                  ,
                InputRecordObj.vCustStatus
                                  ,
                InputRecordObj.vEntryBy
                                  ,
                InputRecordObj.tTimestamp
                                  
            });
            bool Result;
            Result = true;
           // DataTable ResultTable;

           // Result = POSdbAccess.execScalar(SQL_str);
            //ResultTable = ResultSet.Tables[0];

            return Result;


        }
示例#3
0
            public bool CustomerAdd(CustomerListForDisplay InputRecordObj) //Add Customer 
            {
                string _vItemStatus = "Publish";
                string SQL_str = "Insert Into POS_Customer (id" +
                                  ",iCustid" +
                                  ",vCustName" +
                                  ",vCustContactNme" +
                                  ",vCustPrimaryPh" +
                                  ",vCustPhone2" +
                                  ",vCustPhone3" +
                                  ",vCustPhone4" +
                                  ",vCustFax1" +
                                  ",vCustFax2" +
                                  ",vCustEmail" +
                                  ",vCustAddress1" +
                                  ",vCustAddress2" +
                                  ",vCustCity" +
                                  ",vCustState" +
                                  ",vCustCountry" +
                                  ",vCustZipCode" +
                                  ",vCustBillAddress1" +
                                  ",vCustBillAddress2" +
                                  ",vCustBillCity" +
                                  ",vCustBillCountry" +
                                  ",vCustBillZipCode" +
                                  ",vCustShipAddress1" +
                                  ",vCustShipAddress2" +
                                  ",vCustShipCity" +
                                  ",vCustShipState" +
                                  ",vCustShipCountry" +
                                  ",vCustShipZipCode" +
                                  ",vCustAccountNum" +
                                  ",vCustNote1" +
                                  ",vCustNote2" +
                                  ",vCustNote3" +
                                  ",vCustCategory" +
                                  ",vCustComments" +
                                  ",vCustStatus" +
                                  ",vEntryBy" +
                                  ",tTimestamp" +
                                  ",POS_Setup_Id)" +
                                    "Values ( " + "@id" +
                                  ",@iCustid" +
                                  ",@vCustName" +
                                  ",@vCustContactNme" +
                                  ",@vCustPrimaryPh" +
                                  ",@vCustPhone2" +
                                  ",@vCustPhone3" +
                                  ",@vCustPhone4" +
                                  ",@vCustFax1" +
                                  ",@vCustFax2" +
                                  ",@vCustEmail" +
                                  ",@vCustAddress1" +
                                  ",@vCustAddress2" +
                                  ",@vCustCity" +
                                  ",@vCustState" +
                                  ",@vCustCountry" +
                                  ",@vCustZipCode" +
                                  ",@vCustBillAddress1" +
                                  ",@vCustBillAddress2" +
                                  ",@vCustBillCity" +
                                  ",@vCustBillCountry" +
                                  ",@vCustBillZipCode" +
                                  ",@vCustShipAddress1" +
                                  ",@vCustShipAddress2" +
                                  ",@vCustShipCity" +
                                  ",@vCustShipState" +
                                  ",@vCustShipCountry" +
                                  ",@vCustShipZipCode" +
                                  ",@vCustAccountNum" +
                                  ",@vCustNote1" +
                                  ",@vCustNote2" +
                                  ",@vCustNote3" +
                                  ",@vCustCategory" +
                                  ",@vCustComments" +
                                  ",@vCustStatus" +
                                  ",@vEntryBy" +
                                  ",@tTimestamp" +
                                  ",@POS_Setup_Id)" ;


            //Connect to database and retrieve
            SqlCEDataAccess POSdbAccess = new SqlCEDataAccess();

                bool Result;
                DataTable ResultTable;

            Result = POSdbAccess.execScalar(SQL_str);
                //ResultTable = ResultSet.Tables[0];

                return Result;


            }