示例#1
0
        public void Create(YdhlYpzd obj)
        {
            using (var conn = DbHelper.GetDbConnection())
            {
                conn.Execute(@"
IF NOT EXISTS ( SELECT  0
                FROM    dbo.YDHL_YPZD
                WHERE   XH = @XH ) 
   BEGIN
         INSERT INTO dbo.YDHL_YPZD ( ID, XH, YPMC, YPJC )
         VALUES ( @ID, -- ID - uniqueidentifier
                  @XH, -- XH - int
                  @YPMC, -- YPMC - nvarchar(50)
                  @YPJC  -- YPJC - nvarchar(8)
                  )
   END", new
                {
                    ID   = obj.Id,
                    XH   = obj.Xh,
                    YPMC = obj.Ypmc,
                    YPJC = obj.Ypjc
                });
            }
        }
示例#2
0
 public void Create(YdhlYpzd zd)
 {
     YpzdMessageForwarder.Forward(new YpzdCreatedMessage(zd));
 }
示例#3
0
 public void Create(YdhlYpzd zd)
 {
     MessagePublisher.Publish(new YpzdCreatedMessage(zd));
 }
示例#4
0
 public YpzdCreatedMessage(YdhlYpzd yp)
 {
     Yp = yp;
 }