示例#1
0
    public int Delete()
    {
        int rowcount = 0;

        try
        {
            rowcount = Convert.ToInt32(

                DBUtil.DBOp("ConnDB",
                            @" UPDATE [dbo].[C_CaseUserContact] SET [LogicDel] = 1  ,[ModifyDate] = getdate()  ,[ModifyUserID] = {1} WHERE ContactID= {0};
                        declare @CaseID int  ; 
                        select  @CaseID=CaseID  from [C_CaseUserContact]  where ContactID={0} ;   
                        exec dbo.[usp_CaseUser_xUpdateCaseUserMotherID] @CaseID 
                        select @@rowcount            
                    ",
                            new string[] {
                ContactID.ToString()
                , AuthServer.GetLoginUser().ID.ToString()
            },
                            NSDBUtil.CmdOpType.ExecuteScalar));
        }
        catch
        {
        }
        return(rowcount);
    }
示例#2
0
    public int Update()
    {
        int rowcount = 0;

        try
        {
            rowcount = Convert.ToInt32(

                DBUtil.DBOp("ConnDB",
                            "exec dbo.usp_CaseUser_xUpdateContactRelationShip {0},{1},{2},{3} ",
                            new string[] {
                ContactID.ToString()
                , RelationShip.ToString()
                , (IsMain?"1":"0")
                , AuthServer.GetLoginUser().ID.ToString()
            },
                            NSDBUtil.CmdOpType.ExecuteScalar));
        }
        catch
        {
        }
        return(rowcount);
    }