protected void cmdCopyOk_Click(object sender, EventArgs e) { try { string iidstr = txtIidstr.Value; int dest_cid = int.Parse(ddlCopycid.SelectedValue); lstError = new List<Errorobject>(); if (CFunctions.IsNullOrEmpty(iidstr) || dest_cid == 0) { lstError = Form_GetError(lstError, Errortype.Error, Definephrase.Copy_error, "", null); Master.Form_ShowError(lstError); return; } CVideo BLL = new CVideo(CCommon.LANG); string[] iidarr = iidstr.Split(','); for (int i = 0; i < iidarr.Length; i++) { VideoInfo info = BLL.Wcmm_Getinfo(int.Parse(iidarr[i])); this.Copy_Info(info, dest_cid, BLL); } cmdCopyOk.Enabled = false; lstError = Form_GetError(lstError, Errortype.Completed, Definephrase.Copy_completed, "", null); Master.Form_ShowError(lstError); } catch (Exception ex) { CCommon.CatchEx(ex); } }
private void Move_Info(VideoInfo source_info, int dest_cid, CVideo BLL) { if (source_info == null) return; VideoInfo info_copy = source_info.copy(); info_copy.Cid = dest_cid; info_copy.Status = CCommon.GetStatus_upt(); info_copy.Username = CCommon.Get_CurrentUsername(); info_copy.Timeupdate = DateTime.Now; BLL.Save(info_copy); }
private void Copy_Info(VideoInfo source_info, int dest_cid, CVideo BLL) { if (source_info == null) return; VideoInfo info_copy = source_info.copy(); info_copy.Id = 0; info_copy.Cid = dest_cid; info_copy.Status = CCommon.GetStatus_upt(); info_copy.Username = CCommon.Get_CurrentUsername(); info_copy.Timeupdate = DateTime.Now; info_copy.Allowcomment = source_info.Allowcomment > 0 ? 1 : 0; info_copy.Orderd = 0; BLL.Save(info_copy); }
protected void cmdUpdateorder_Click(object sender, ImageClickEventArgs e) { try { if (grdView.Rows.Count == 0) return; CVideo BLL = new CVideo(CCommon.LANG); foreach (GridViewRow row in grdView.Rows) { HiddenField txtId = (HiddenField)row.FindControl("txtId"); TextBox txtOrderd = (TextBox)row.FindControl("txtOrderd"); if (txtId != null && txtOrderd != null) { int id = int.Parse(txtId.Value); int orderd = 0; int.TryParse(txtOrderd.Text, out orderd); BLL.Updatenum(id.ToString(), Queryparam.Sqlcolumn.Orderd, orderd); } lstError = new List<Errorobject>(); lstError = Form_GetError(lstError, Errortype.Completed, Definephrase.Saveorderd_completed, "", null); Master.Form_ShowError(lstError); } } catch { lstError = new List<Errorobject>(); lstError = Form_GetError(lstError, Errortype.Error, Definephrase.Saveorderd_error, "", null); Master.Form_ShowError(lstError); } }