コード例 #1
0
        public int CompareTo(object obj)
        {
            PayPlusChargeInfo b = obj as PayPlusChargeInfo;

            if (string.Compare(this.BankName, b.BankName) >= 0)
            {
                return(1);
            }
            else
            {
                return(-1);
            }
        }
コード例 #2
0
ファイル: ASPDac.cs プロジェクト: ue96/ue96
        public int UpdatePayPlusCharge(PayPlusChargeInfo oParam)
        {
            string sql = @"UPDATE PayPlusCharge SET
                            BankName=@BankName, InstallmentNum=@InstallmentNum,
                            PlusRate=@PlusRate, Status=@Status
                            WHERE SysNo=@SysNo";
            SqlCommand cmd = new SqlCommand(sql);

            SqlParameter paramSysNo = new SqlParameter("@SysNo", SqlDbType.Int, 4);
            SqlParameter paramBankName = new SqlParameter("@BankName", SqlDbType.NVarChar, 50);
            SqlParameter paramInstallmentNum = new SqlParameter("@InstallmentNum", SqlDbType.Int, 4);
            SqlParameter paramPlusRate = new SqlParameter("@PlusRate", SqlDbType.Decimal, 9);
            SqlParameter paramStatus = new SqlParameter("@Status", SqlDbType.Int, 4);

            if (oParam.SysNo != AppConst.IntNull)
                paramSysNo.Value = oParam.SysNo;
            else
                paramSysNo.Value = System.DBNull.Value;
            if (oParam.BankName != AppConst.StringNull)
                paramBankName.Value = oParam.BankName;
            else
                paramBankName.Value = System.DBNull.Value;
            if (oParam.InstallmentNum != AppConst.IntNull)
                paramInstallmentNum.Value = oParam.InstallmentNum;
            else
                paramInstallmentNum.Value = System.DBNull.Value;
            if (oParam.PlusRate != AppConst.DecimalNull)
                paramPlusRate.Value = oParam.PlusRate;
            else
                paramPlusRate.Value = System.DBNull.Value;
            if (oParam.Status != AppConst.IntNull)
                paramStatus.Value = oParam.Status;
            else
                paramStatus.Value = System.DBNull.Value;

            cmd.Parameters.Add(paramSysNo);
            cmd.Parameters.Add(paramBankName);
            cmd.Parameters.Add(paramInstallmentNum);
            cmd.Parameters.Add(paramPlusRate);
            cmd.Parameters.Add(paramStatus);

            return SqlHelper.ExecuteNonQuery(cmd);
        }