示例#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();
            }
        }