private void Copy_Info(CategoryattrInfo source_info, int dest_cid, int dest_pid, int dest_depth, bool getchild, CCategoryattr BLL) { if (source_info == null) return; CategoryattrInfo info_copy = source_info.copy(); info_copy.Id = 0; info_copy.Cid = dest_cid; info_copy.Pid = dest_pid; info_copy.Depth = dest_depth + 1; info_copy.Status = CCommon.GetStatus_upt(); info_copy.Username = CCommon.Get_CurrentUsername(); info_copy.Timeupdate = DateTime.Now; info_copy.Orderd = 0; info_copy.Pis = getchild ? info_copy.Pis : (info_copy.Pis > 0 ? 1 : 0); if (BLL.Save(info_copy)) { //BLL.Updatenum(dest_pid.ToString(), Queryparam.Sqlcolumn.Pis, 1); if (getchild) { List<CategoryattrInfo> listsub = BLL.Wcmm_Getlist(source_info.Cid, source_info.Id, Get_ListOptionsNoPaging()); if (listsub == null || listsub.Count == 0) return; foreach (CategoryattrInfo info_sub in listsub) { this.Copy_Info(info_sub, dest_cid, info_copy.Id, info_copy.Depth, getchild, BLL); } } } }