コード例 #1
0
        public HSCodes GetHSCodeRecord(int recordID, string UserSNo)
        {
            HSCodes       ct = new HSCodes();
            SqlDataReader dr = null;

            try
            {
                SqlParameter[] Parameters = { new SqlParameter("@SNo", Convert.ToInt32(recordID)), new SqlParameter("@UserID", Convert.ToInt32(UserSNo)) };
                dr = SqlHelper.ExecuteReader(DMLConnectionString.WebConfigConnectionString, CommandType.StoredProcedure, "GetRecordHSCode", Parameters);
                if (dr.Read())
                {
                    ct.SNo = Convert.ToInt32(dr["SNo"]);
                    if (!String.IsNullOrEmpty(dr["IsActive"].ToString()))
                    {
                        ct.IsActive = Convert.ToBoolean(dr["IsActive"]);
                        ct.Active   = dr["Active"].ToString().ToUpper();
                    }
                    ct.HSCode             = dr["HSCode"].ToString().ToUpper();
                    ct.DescriptionOFGoods = dr["DescriptionOFGoods"].ToString().ToUpper();
                    ct.UpdatedBy          = dr["UpdatedUser"].ToString();
                    ct.CreatedBy          = dr["CreatedUser"].ToString();
                }
            }
            catch (Exception ex)
            {
                dr.Close();
                throw ex;
            }
            return(ct);
        }
コード例 #2
0
        public List <HSCodes> GetHSCodeAutoComplete(string SearchText)
        {
            MatersDataManager objMDM        = new MatersDataManager();
            List <HSCodes>    objHsCodeList = new List <HSCodes>();

            foreach (DataRow dr in objMDM.GetHSCodesAutoComplete(SearchText).Rows)
            {
                HSCodes obj = new HSCodes();
                obj.HSCode = Convert.ToString(dr["id"]);
                obj.Text   = Convert.ToString(dr["text"]);
                objHsCodeList.Add(obj);
            }
            return(objHsCodeList);
        }