public void Edit_tblOrder_Record(Tables.tblOrder_Record record)
        {
            Params.spU_tblOrder param = new Params.spU_tblOrder(false);

            param.SetUpConnection(string.Empty);

            param.Param_Ord_GuidID = record.Col_Ord_GuidID.Value;

            if (record.Col_Ord_DatOrderedOn == null || record.Col_Ord_DatOrderedOn.UseNull)
            {
                param.Param_ConsiderNull_Ord_DatOrderedOn = true;
                param.Param_Ord_DatOrderedOn = SqlDateTime.Null;
            }
            else if (!record.Col_Ord_DatOrderedOn.UseDefault)
            {
                param.Param_Ord_DatOrderedOn = record.Col_Ord_DatOrderedOn.Value;
            }

            if (record.Col_Ord_LngCustomerID == null || record.Col_Ord_LngCustomerID.UseNull)
            {
                param.Param_ConsiderNull_Ord_LngCustomerID = true;
                param.Param_Ord_LngCustomerID = SqlInt32.Null;
            }
            else if (!record.Col_Ord_LngCustomerID.UseDefault)
            {
                param.Param_Ord_LngCustomerID = record.Col_Ord_LngCustomerID.Value;
            }

            if (record.Col_Ord_CurTotal == null || record.Col_Ord_CurTotal.UseNull)
            {
                param.Param_ConsiderNull_Ord_CurTotal = true;
                param.Param_Ord_CurTotal = SqlMoney.Null;
            }
            else if (!record.Col_Ord_CurTotal.UseDefault)
            {
                param.Param_Ord_CurTotal = record.Col_Ord_CurTotal.Value;
            }


            using (SPs.spU_tblOrder sp = new SPs.spU_tblOrder(true)) {
                sp.Execute(ref param);
                param.Dispose();
            }
        }
예제 #2
0
        public void Execute(WSGuid Ord_GuidID, WSDateTime Ord_DatOrderedOn, WSBoolean ConsiderNull_Ord_DatOrderedOn, WSInt32 Ord_LngCustomerID, WSBoolean ConsiderNull_Ord_LngCustomerID, WSDecimal Ord_CurTotal, WSBoolean ConsiderNull_Ord_CurTotal)
        {
            Params.spU_tblOrder param = new Params.spU_tblOrder(true);
            param.SetUpConnection(string.Empty);

            if (Ord_GuidID == null || Ord_GuidID.UseNull)
            {
                param.Param_Ord_GuidID = SqlGuid.Null;
            }
            else if (!Ord_GuidID.UseDefault)
            {
                param.Param_Ord_GuidID = Ord_GuidID.Value;
            }

            if (Ord_DatOrderedOn == null || Ord_DatOrderedOn.UseNull)
            {
                param.Param_Ord_DatOrderedOn = SqlDateTime.Null;
            }
            else if (!Ord_DatOrderedOn.UseDefault)
            {
                param.Param_Ord_DatOrderedOn = Ord_DatOrderedOn.Value;
            }

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

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

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

            if (Ord_CurTotal == null || Ord_CurTotal.UseNull)
            {
                param.Param_Ord_CurTotal = SqlMoney.Null;
            }
            else if (!Ord_CurTotal.UseDefault)
            {
                param.Param_Ord_CurTotal = Ord_CurTotal.Value;
            }

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

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