コード例 #1
0
ファイル: DataProvider.cs プロジェクト: pluthong/assimil
        public int TransitList(DVLotteryUser lot)
        {
            int affectedRows = 0;

            try
            {
                // Inizializzazione della variabile di errore
                _excLastError = null;

                String sqlUpdate = @"UPDATE [dbo].[DVLottery]
                                          SET    Status        = @Status,
                                                 UpdateDt      = getdate()
                                          WHERE  FCN = @FCN              ";


                List <SqlParameter> parameterList = new List <SqlParameter>();
                parameterList.Add(new SqlParameter("@Status", lot.Status));
                parameterList.Add(new SqlParameter("@FCN", lot.FCN));

                this.DatabaseLOCAL.ExecCommand(sqlUpdate, CommandType.Text, parameterList, out affectedRows);
            }
            catch (Exception ex)
            {
                _excLastError = ex;
                affectedRows  = 0;
            }

            return(affectedRows);
        }
コード例 #2
0
ファイル: DataCenter.cs プロジェクト: pluthong/assimil
        public bool TransitList(DVLotteryUser user)
        {
            int result = 0;

            try
            {
                result = Provider.TransitList(user);
            }
            catch (Exception ex)
            {
                throw;
            }

            return(result != 0);
        }
コード例 #3
0
ファイル: DataProvider.cs プロジェクト: pluthong/assimil
        public int UpdateList(DVLotteryUser lot)
        {
            int affectedRows = 0;

            try
            {
                // Inizializzazione della variabile di errore
                _excLastError = null;

                String sqlUpdate = @"UPDATE [dbo].[DVLottery]
                                          SET    CON           = @CON,
                                                 Status        = @Status,
                                                 SubmitDate    = @SubmitDate,
                                                 StatusDate    = @StatusDate,
                                                 FamilyMembers = @FamilyMembers,
                                                 ISSUED        = @ISSUED,
                                                 REFUSED       = @REFUSED,
                                                 AP            = @AP,
                                                 READY         = @READY,
                                                 TRANSFER      = @TRANSFER,
                                                 UpdateDt      = getdate()
                                          WHERE  FCN = @FCN              ";


                List <SqlParameter> parameterList = new List <SqlParameter>();
                parameterList.Add(new SqlParameter("@CON", lot.CON));
                parameterList.Add(new SqlParameter("@Status", lot.Status));
                parameterList.Add(new SqlParameter("@SubmitDate", lot.SubmitDate));
                parameterList.Add(new SqlParameter("@StatusDate", lot.StatusDate));
                parameterList.Add(new SqlParameter("@FamilyMembers", lot.FamilyMembers));
                parameterList.Add(new SqlParameter("@ISSUED", lot.ISSUED));
                parameterList.Add(new SqlParameter("@REFUSED", lot.REFUSED));
                parameterList.Add(new SqlParameter("@AP", lot.AP));
                parameterList.Add(new SqlParameter("@READY", lot.READY));
                parameterList.Add(new SqlParameter("@TRANSFER", lot.TRANSFER));
                parameterList.Add(new SqlParameter("@FCN", lot.FCN));

                this.DatabaseLOCAL.ExecCommand(sqlUpdate, CommandType.Text, parameterList, out affectedRows);
            }
            catch (Exception ex)
            {
                _excLastError = ex;
                affectedRows  = 0;
            }

            return(affectedRows);
        }