Exemple #1
0
        public static void fn顧客更新(CCustomer customer)
        {
            string sql = $"EXEC 顧客更新 ";

            sql += $"@{CCustomerKey.fCustomerId},";
            sql += $"@{CCustomerKey.fCustomerName},";
            sql += $"@{CCustomerKey.fCustomerBirth},";
            sql += $"@{CCustomerKey.fCustomerGender},";
            sql += $"@{CCustomerKey.fCustomerEmail},";
            sql += $"@{CCustomerKey.fCustomerAddress},";
            sql += $"@{CCustomerKey.fCustomerPhone}";



            List <SqlParameter> paras = new List <SqlParameter>()
            {
                new SqlParameter(CCustomerKey.fCustomerId, customer.fCustomerId),
                new SqlParameter(CCustomerKey.fCustomerName, customer.fCustomerName),
                new SqlParameter(CCustomerKey.fCustomerBirth, customer.fCustomerBirth),
                new SqlParameter(CCustomerKey.fCustomerGender, customer.fCustomerGender),
                new SqlParameter(CCustomerKey.fCustomerEmail, customer.fCustomerEmail),
                new SqlParameter(CCustomerKey.fCustomerAddress, customer.fCustomerAddress),
                new SqlParameter(CCustomerKey.fCustomerPhone, customer.fCustomerPhone)
            };

            CDbManager.executeSql(sql, paras);
        }
Exemple #2
0
        public static void fn顧客刪除(CCustomer customer)
        {
            string sql = $"EXEC 顧客刪除 ";

            sql += $"@{CCustomerKey.fCustomerId}";

            List <SqlParameter> paras = new List <SqlParameter>()
            {
                new SqlParameter(CCustomerKey.fCustomerId, customer.fCustomerId)
            };

            CDbManager.executeSql(sql, paras);
        }