Пример #1
0
        /// <summary>
        /// 修改
        /// </summary>
        private void Modify()
        {
            editType = EditType.Modify;
            //修改
            #region 获取信息
            FtpFile obj = new FtpFile();
            obj.PrimaryID      = this.lbPrimaryID.Text;
            obj.FileName       = this.lbFileName.Text;
            obj.LocalDirectory = this.lbFilePath.Text;
            obj.FileVersion    = this.lbFileVersion.Text;
            obj.OperCode       = this.lbOperCode.Text;
            obj.OperDate       = System.DateTime.Now;
            //string strSql = "select t.file_content  from com_downloadfile t where t.primary_id = '{0}'";
            //strSql = string.Format(strSql,obj.PrimaryID);
            //System.Data.DataSet ds = mgr.SelectData(con,strSql);
            //byte [] blob = null;
            //foreach(DataRow row in ds.Tables[0].Rows)
            //{
            //    blob = (byte [])row[0];
            //}
            //obj.FileContent = blob; modified by xipeter 20120831 更新文件时,没有必要得到文件内容
            #endregion

            frmInfo frm = new frmInfo();
            frm.Con = con;
            frm.SetInfo(obj);
            frm.myEditType  = EditType.Modify;            //修改
            frm.SaveHandle += new AutoUpdate.frmInfo.SaveDelegate(frm_SaveHandle);
            frm.ShowDialog();
        }
Пример #2
0
        /// <summary>
        /// 增加一行
        /// </summary>
        private void Add()
        {
            editType = EditType.Add;
            //增加
            frmInfo frm = new frmInfo();

            frm.Con = con;
            frm.CreatPrimarKey();
            frm.SaveHandle += new AutoUpdate.frmInfo.SaveDelegate(frm_SaveHandle);
            frm.myEditType  = EditType.Add;            //修改
            frm.ShowDialog();
        }