예제 #1
0
        public bool AddMRacInv(MRank mRank)
        {
            SqlCommand cmd;

            cmd             = new SqlCommand();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "AddMRacInv";

            cmd.Parameters.AddWithValue("@RacInvNo", mRank.RacInvNo);

            //cmd.Parameters.AddWithValue("@CityName", mcity.CityName);

            cmd.Parameters.AddWithValue("@ItemNo", mRank.ItemNo);

            // cmd.Parameters.AddWithValue("@Uom", mRank.UOM);
            // cmd.Parameters.AddWithValue("@Quantity", mRank.Quantity);

            //cmd.Parameters.AddWithValue("@CountryNo", mcity.CountryNo);

            //cmd.Parameters.AddWithValue("@StateNo", mcity.StateNo);

            //cmd.Parameters.AddWithValue("@RegionNo", mcity.RegionNo);

            cmd.Parameters.AddWithValue("@IsActive", mRank.IsActive);

            cmd.Parameters.AddWithValue("@UserID", mRank.UserID);

            cmd.Parameters.AddWithValue("@UserDate", mRank.UserDate);


            SqlParameter outParameter = new SqlParameter();

            outParameter.ParameterName = "@ReturnID";
            outParameter.Direction     = ParameterDirection.Output;
            outParameter.DbType        = DbType.Int32;
            cmd.Parameters.Add(outParameter);

            commandcollection.Add(cmd);
            return(true);

            // cmd.Parameters.AddWithValue("@CompanyNo", mcity.CompanyNo);

            //cmd.Parameters.AddWithValue("@ModifiedBy", mcity.ModifiedBy);
            //if (ObjTrans.ExecuteNonQuery(cmd, CommonFunctions.ConStr) == true)
            //{
            //    return true;
            //}
            //else
            //{
            //    mRank.msg = ObjTrans.ErrorMessage;
            //    return false;
            //}
        }
예제 #2
0
        public bool DeletemRank(MRank mRank)
        {
            SqlCommand cmd;

            cmd             = new SqlCommand();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "DeleteMCity";

            cmd.Parameters.AddWithValue("@RankNo", mRank.RacInvNo);
            if (ObjTrans.ExecuteNonQuery(cmd, CommonFunctions.ConStr) == true)
            {
                return(true);
            }
            else
            {
                mRank.msg = ObjTrans.ErrorMessage;
                return(false);
            }
        }