Beispiel #1
0
        public void Edit_tblCustomer_Record(Tables.tblCustomer_Record record)
        {
            Params.spU_tblCustomer param = new Params.spU_tblCustomer(false);

            param.SetUpConnection(string.Empty);

            param.Param_Cus_LngID = record.Col_Cus_LngID.Value;

            if (record.Customer_Surname == null || record.Customer_Surname.UseNull)
            {
                param.Param_ConsiderNull_Cus_StrLastName = true;
                param.Param_Cus_StrLastName = SqlString.Null;
            }
            else if (!record.Customer_Surname.UseDefault)
            {
                param.Param_Cus_StrLastName = record.Customer_Surname.Value;
            }

            if (record.Col_Cus_StrFirstName == null || record.Col_Cus_StrFirstName.UseNull)
            {
                param.Param_ConsiderNull_Cus_StrFirstName = true;
                param.Param_Cus_StrFirstName = SqlString.Null;
            }
            else if (!record.Col_Cus_StrFirstName.UseDefault)
            {
                param.Param_Cus_StrFirstName = record.Col_Cus_StrFirstName.Value;
            }

            if (record.Col_Cus_StrEmail == null || record.Col_Cus_StrEmail.UseNull)
            {
                param.Param_ConsiderNull_Cus_StrEmail = true;
                param.Param_Cus_StrEmail = SqlString.Null;
            }
            else if (!record.Col_Cus_StrEmail.UseDefault)
            {
                param.Param_Cus_StrEmail = record.Col_Cus_StrEmail.Value;
            }


            using (SPs.spU_tblCustomer sp = new SPs.spU_tblCustomer(true)) {
                sp.Execute(ref param);
                param.Dispose();
            }
        }
Beispiel #2
0
        public void Execute(WSInt32 Cus_LngID, WSString Cus_StrLastName, WSBoolean ConsiderNull_Cus_StrLastName, WSString Cus_StrFirstName, WSBoolean ConsiderNull_Cus_StrFirstName, WSString Cus_StrEmail, WSBoolean ConsiderNull_Cus_StrEmail)
        {
            Params.spU_tblCustomer param = new Params.spU_tblCustomer(true);
            param.SetUpConnection(string.Empty);

            if (Cus_LngID == null || Cus_LngID.UseNull)
            {
                param.Param_Cus_LngID = SqlInt32.Null;
            }
            else if (!Cus_LngID.UseDefault)
            {
                param.Param_Cus_LngID = Cus_LngID.Value;
            }

            if (Cus_StrLastName == null || Cus_StrLastName.UseNull)
            {
                param.Param_Cus_StrLastName = SqlString.Null;
            }
            else if (!Cus_StrLastName.UseDefault)
            {
                param.Param_Cus_StrLastName = Cus_StrLastName.Value;
            }

            if (ConsiderNull_Cus_StrLastName == null || ConsiderNull_Cus_StrLastName.UseNull)
            {
                param.Param_ConsiderNull_Cus_StrLastName = SqlBoolean.Null;
            }
            else if (!ConsiderNull_Cus_StrLastName.UseDefault)
            {
                param.Param_ConsiderNull_Cus_StrLastName = ConsiderNull_Cus_StrLastName.Value;
            }

            if (Cus_StrFirstName == null || Cus_StrFirstName.UseNull)
            {
                param.Param_Cus_StrFirstName = SqlString.Null;
            }
            else if (!Cus_StrFirstName.UseDefault)
            {
                param.Param_Cus_StrFirstName = Cus_StrFirstName.Value;
            }

            if (ConsiderNull_Cus_StrFirstName == null || ConsiderNull_Cus_StrFirstName.UseNull)
            {
                param.Param_ConsiderNull_Cus_StrFirstName = SqlBoolean.Null;
            }
            else if (!ConsiderNull_Cus_StrFirstName.UseDefault)
            {
                param.Param_ConsiderNull_Cus_StrFirstName = ConsiderNull_Cus_StrFirstName.Value;
            }

            if (Cus_StrEmail == null || Cus_StrEmail.UseNull)
            {
                param.Param_Cus_StrEmail = SqlString.Null;
            }
            else if (!Cus_StrEmail.UseDefault)
            {
                param.Param_Cus_StrEmail = Cus_StrEmail.Value;
            }

            if (ConsiderNull_Cus_StrEmail == null || ConsiderNull_Cus_StrEmail.UseNull)
            {
                param.Param_ConsiderNull_Cus_StrEmail = SqlBoolean.Null;
            }
            else if (!ConsiderNull_Cus_StrEmail.UseDefault)
            {
                param.Param_ConsiderNull_Cus_StrEmail = ConsiderNull_Cus_StrEmail.Value;
            }

            using (SPs.spU_tblCustomer sp = new SPs.spU_tblCustomer(true)) {
                sp.Execute(ref param);
                param.Dispose();
            }
        }