public void Execute(WSInt32 Cat_LngID, WSString Cat_StrName) { Params.spI_tblCategory param = new Params.spI_tblCategory(true); param.SetUpConnection(string.Empty); if (Cat_LngID == null || Cat_LngID.UseNull) { param.Param_Cat_LngID = SqlInt32.Null; } else if (!Cat_LngID.UseDefault) { param.Param_Cat_LngID = Cat_LngID.Value; } if (Cat_StrName == null || Cat_StrName.UseNull) { param.Param_Cat_StrName = SqlString.Null; } else if (!Cat_StrName.UseDefault) { param.Param_Cat_StrName = Cat_StrName.Value; } using (SPs.spI_tblCategory sp = new SPs.spI_tblCategory(true)) { sp.Execute(ref param); param.Dispose(); } }
public Int32 Add_Category(Tables.Category record) { Params.spI_tblCategory param = new Params.spI_tblCategory(true); param.SetUpConnection(string.Empty); if (record.Col_Cat_StrName == null || record.Col_Cat_StrName.UseNull) { param.Param_Cat_StrName = SqlString.Null; } else if (!record.Col_Cat_StrName.UseDefault) { param.Param_Cat_StrName = record.Col_Cat_StrName.Value; } using (SPs.spI_tblCategory sp = new SPs.spI_tblCategory(true)) { sp.Execute(ref param); Int32 id = param.Param_Cat_LngID.Value; param.Dispose(); return(id); } }