示例#1
0
        private void btAdds_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) {

            frmsd_tsqyEdit frmtsqy = new frmsd_tsqyEdit();
            sd_tsqy tsqy = new sd_tsqy();
            tsqy.OrgCode = parentObj.OrgCode;
            tsqy.LineID = parentObj.LineID;
            tsqy.zldm = parentType.zldm;
            tsqy.createdate = DateTime.Now;
            tsqy.createman = MainHelper.User.UserName;
            frmtsqy.sdxl = this.parentObj;
            frmtsqy.tsqyzl = this.parentType;
            frmtsqy.RowData = tsqy;
            if (frmtsqy.ShowDialog() == DialogResult.OK) {
                Client.ClientHelper.PlatformSqlMap.Create<sd_tsqy>(frmtsqy.RowData);
                if (frmtsqy.GetImage() != null) {
                    sd_tsqyimage tsqyImage = new sd_tsqyimage();
                    tsqyImage.ParentID = tsqy.ID;
                    tsqyImage.data = (byte[])frmtsqy.GetImage();
                    Client.ClientHelper.PlatformSqlMap.Create<sd_tsqyimage>(tsqyImage);

                }
                RefreshData();
            }
        }
示例#2
0
        /// <summary>
        /// 新建对象设置Key值
        /// </summary>
        /// <param name="newobj"></param>
        void gridViewOperation_CreatingObjectEvent(sd_tsqy newobj) {

            if (gridView1.FocusedRowHandle > -1) {
                //sd_tsqy tq = gridView1.GetFocusedRow() as sd_tsqy;
                //Ebada.Core.ConvertHelper.CopyTo(tq, newobj);
                newobj.ID = newobj.CreateID();
            }
            newobj.OrgCode = parentObj.OrgCode;
            newobj.LineID = parentObj.LineID;
            newobj.zldm = parentType.zldm;
            newobj.createdate = DateTime.Now;
            newobj.createman = MainHelper.User.UserName;

        }