Exemplo n.º 1
0
        public void Execute(WSGuid Sup_GuidID, WSString Sup_StrName, WSBoolean ConsiderNull_Sup_StrName)
        {
            Params.spU_tblSupplier param = new Params.spU_tblSupplier(true);
            param.SetUpConnection(string.Empty);

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

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

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

            using (SPs.spU_tblSupplier sp = new SPs.spU_tblSupplier(true)) {
                sp.Execute(ref param);
                param.Dispose();
            }
        }
Exemplo n.º 2
0
        public void Edit_Supplier(Tables.Supplier record)
        {
            Params.spU_tblSupplier param = new Params.spU_tblSupplier(false);

            param.SetUpConnection(string.Empty);

            param.Param_Sup_GuidID = record.Col_Sup_GuidID.Value;

            if (record.Col_Sup_StrName == null || record.Col_Sup_StrName.UseNull)
            {
                param.Param_ConsiderNull_Sup_StrName = true;
                param.Param_Sup_StrName = SqlString.Null;
            }
            else if (!record.Col_Sup_StrName.UseDefault)
            {
                param.Param_Sup_StrName = record.Col_Sup_StrName.Value;
            }


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