//public DataTable category_WSSelectAll()
        //{
        //    DataTable dt = new DataTable();
        //    try
        //    {
        //        Cls_maincategory_db objCls_maincategory_db = new Cls_maincategory_db();
        //        dt = objCls_maincategory_db.category_WSSelectAll();
        //        return dt;
        //    }
        //    catch (Exception ex)
        //    {
        //        ErrHandler.writeError(ex.Message, ex.StackTrace);
        //        return dt;
        //    }
        //}
        public maincategory SelectById(Int64 cid)
        {
            maincategory objcategory = new maincategory();

            try
            {
                Cls_maincategory_db objCls_maincategory_db = new Cls_maincategory_db();
                objcategory = objCls_maincategory_db.SelectById(cid);
                return(objcategory);
            }
            catch (Exception ex)
            {
                ErrHandler.writeError(ex.Message, ex.StackTrace);
                return(objcategory);
            }
        }
        public Int64 Update(maincategory objcategory)
        {
            Int64 result = 0;

            try
            {
                Cls_maincategory_db objCls_maincategory_db = new Cls_maincategory_db();
                result = Convert.ToInt64(objCls_maincategory_db.Update(objcategory));
                return(result);
            }
            catch (Exception ex)
            {
                ErrHandler.writeError(ex.Message, ex.StackTrace);
                return(result);
            }
        }