当前位置: 首页>>代码示例>>C#>>正文


C# ObjectOperationEventArgs类代码示例

本文整理汇总了C#中ObjectOperationEventArgs的典型用法代码示例。如果您正苦于以下问题:C# ObjectOperationEventArgs类的具体用法?C# ObjectOperationEventArgs怎么用?C# ObjectOperationEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ObjectOperationEventArgs类属于命名空间,在下文中一共展示了ObjectOperationEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: treeViewOperator_BeforeAdd

        void treeViewOperator_BeforeAdd(object render, ObjectOperationEventArgs<sd_xl> e) {
            if (ParentObj == null) {
                MsgBox.ShowTipMessageBox("请先选择供电所!");
                e.Cancel = true;

            }
        }
开发者ID:s7loves,项目名称:mypowerscgl,代码行数:7,代码来源:UCsd_xlTree.cs

示例2: gridViewOperation_BeforeInsert

        void gridViewOperation_BeforeInsert(object render, ObjectOperationEventArgs<BD_SBTZ> e)
        {
            e.Cancel = true;
            try
            {
                frmSBTZ frm = gridViewOperation.EditForm as frmSBTZ;
                PS_Image image = null;
                if (frm.GetImage() != null)
                {
                    image = new PS_Image();
                    image.ImageName = "变电设备照片";
                    image.ImageType = "sdsb";
                    image.ImageData = (byte[])frm.GetImage();
                    e.Value.c3 = image.ImageID;
                    Client.ClientHelper.PlatformSqlMap.ExecuteTransationUpdate(new object[] { e.Value, image }, null, null);
                }
                else
                {
                    Client.ClientHelper.PlatformSqlMap.Create<BD_SBTZ>(e.Value);
                }

                gridViewOperation.BindingList.Add(e.Value);
            }
            catch (Exception err) { throw err; }
        }
开发者ID:s7loves,项目名称:mypowerscgl,代码行数:25,代码来源:UCBD_SBTZ.cs

示例3: gridViewOperation_BeforeUpdate

        void gridViewOperation_BeforeUpdate(object render, ObjectOperationEventArgs<sd_tsqy> e) {
            //e.Cancel = true;
            //try
            //{
            //    sd_tsqy sdsb = e.Value;
            //    frmSBTZ frm = gridViewOperation.EditForm as frmSBTZ;
            //    PS_Image image = frm.GetPS_Image();
            //    if (frm.GetImage() != null)
            //    {
            //        if (sdsb.a25 == "" || image == null)
            //        {
            //            image = new PS_Image();
            //            image.ImageName = "特殊区域照片";
            //            image.ImageType = "sdsb";
            //            image.ImageData = (byte[])frm.GetImage();
            //            sdsb.a25 = image.ImageID;
            //            Client.ClientHelper.PlatformSqlMap.ExecuteTransationUpdate(image, sdsb, null);
            //        }
            //        else
            //        {

            //            Client.ClientHelper.PlatformSqlMap.ExecuteTransationUpdate(null, new object[] { sdsb, image }, null);
            //        }

            //    }
            //    else
            //    {
            //        Client.ClientHelper.PlatformSqlMap.Update<sd_tsqy>(e.Value);
            //    }

            //    Ebada.Core.ConvertHelper.CopyTo(sdsb, e.ValueOld);
            //}
            //catch (Exception err) { throw err; }
        }
开发者ID:s7loves,项目名称:mypowerscgl,代码行数:34,代码来源:UCsd_tsqy.cs

示例4: treeViewOperator_BeforeDelete

 void treeViewOperator_BeforeDelete(object render, ObjectOperationEventArgs<VOrgLevel> e) {
     //检查子表是否有相关联数据
     if (ChildView != null && childView.BindingList.Count > 0) {
         e.Cancel = true;
         MainHelper.ShowWarningMessageBox("当前要删除的记录已被引用,不可删除!");
     }
 }
开发者ID:s7loves,项目名称:mypowerscgl,代码行数:7,代码来源:UCLeft.cs

示例5: gridViewOperation_BeforeEdit

 void gridViewOperation_BeforeEdit(object render, ObjectOperationEventArgs<PS_XLSec> e)
 {
     if (parentID == null)
         e.Cancel = true;
     frmXLSecEdit frm = gridViewOperation.EditForm as frmXLSecEdit;
     frm.ParentObj = ParentObj;
 }
开发者ID:s7loves,项目名称:mypowerscgl,代码行数:7,代码来源:UCPS_XLSec.cs

示例6: gridViewOperation_BeforeAdd

 void gridViewOperation_BeforeAdd(object render, ObjectOperationEventArgs<PS_xl> e) {
     if (string.IsNullOrEmpty(parentID))
     {
         e.Cancel = true;
         MsgBox.ShowWarningMessageBox("请先选择机构后增加职员!");
     }
 }
开发者ID:s7loves,项目名称:mypowerscgl,代码行数:7,代码来源:UCmLine.cs

示例7: gridViewOperation_BeforEdit

 void gridViewOperation_BeforEdit(object render, ObjectOperationEventArgs<sdjl_sbxsqd> e) {
     if (ParentID == null) {
         e.Cancel = true;
     }
     fdialog.orgcode = parentObj.OrgID;
     //fdialog.RowData = gridView1.GetRow(gridView1.FocusedRowHandle) as sdjl_sbxsqd;
 }
开发者ID:s7loves,项目名称:mypowerscgl,代码行数:7,代码来源:UCSDXSQD.cs

示例8: gridViewOperation_BeforeAdd

 void gridViewOperation_BeforeAdd(object render, ObjectOperationEventArgs<Empolyees> e) {
     //判断是否有parentid值,如果没有不允许增加子表记录
     if (string.IsNullOrEmpty(parentID)) {
         e.Cancel = true;
         MainHelper.ShowWarningMessageBox("请先选择单位后增加职员!");
     }
 }
开发者ID:s7loves,项目名称:mypowerscgl,代码行数:7,代码来源:UCBottom.cs

示例9: gridViewOperation_BeforeDelete

        void gridViewOperation_BeforeDelete(object render, ObjectOperationEventArgs<mOrg> e) {
            if (ChildView != null && childView.BindingList.Count > 0) {
                e.Cancel = true;
                MainHelper.ShowWarningMessageBox("当前要删除的记录已被引用,不可删除!");
            }

        }
开发者ID:s7loves,项目名称:mypowerscgl,代码行数:7,代码来源:UCTop.cs

示例10: gridViewOperation_BeforeUpdate

 void gridViewOperation_BeforeUpdate(object render, ObjectOperationEventArgs<mUser> e)
 {
     if (e.Value.Password.Length <= 12)
     {
         e.Value.Password = MainHelper.EncryptoPassword(e.Value.Password);
     }
 }
开发者ID:s7loves,项目名称:mypowerscgl,代码行数:7,代码来源:UCmUser.cs

示例11: gridViewOperation_BeforeAdd

 void gridViewOperation_BeforeAdd(object render, ObjectOperationEventArgs<bdjl_ksjl> e)
 {
     if (parentID == null)
         e.Cancel = true;
     if (string.IsNullOrEmpty(baruser.EditValue as string))
         e.Cancel = true;
 }
开发者ID:s7loves,项目名称:mypowerscgl,代码行数:7,代码来源:Ucm_ksjl.cs

示例12: gridViewOperation_BeforeEdit

 void gridViewOperation_BeforeEdit(object render, ObjectOperationEventArgs<JH_yearks> e) {
     if (e.Value.计划分类 != type2 ||e.Value.单位分类 != type1) {
         e.Cancel = true;
         MsgBox.ShowAskMessageBox("此记录不能修改");
         return;
     }
 }
开发者ID:s7loves,项目名称:mypowerscgl,代码行数:7,代码来源:UCJH_yearks.cs

示例13: gridViewOperation_BeforeUpdate

 void gridViewOperation_BeforeUpdate(object render, ObjectOperationEventArgs<PS_XLSec> e)
 {
     e.Cancel = true;
     if (ParentObj==null)
     {
         return;
     }
     IList<PS_XLSec> xlSecList = (IList<PS_XLSec>)gridControl1.DataSource;
     if (xlSecList == null)
     {
         return;
     }
    // IList<PS_XLSec> xlSecList = Ebada.Core.ConvertHelper.ToIList<PS_XLSec>(dt);
     PS_XLSec xlSec = (gridViewOperation.EditForm as frmXLSecEdit).RowData as PS_XLSec;
     for (int i = 0; i < xlSecList.Count;i++ )
     {
         PS_XLSec xlSecTemp = xlSecList[i];
         if (xlSecTemp.ID==xlSec.ID)
         {
             xlSecList[i].StartGT = xlSec.StartGT;
             xlSecList[i].EndGT = xlSec.EndGT;
             xlSecList[i].LineType = xlSec.LineType;
         }
     }
     string strXLSec = ListCacheHelper.GetXLSecString(xlSecList);
     ParentObj.SectionalizedMessage = strXLSec;
     Client.ClientHelper.PlatformSqlMap.Update<PS_xl>(ParentObj);
     Refresh();
     return;
 }
开发者ID:s7loves,项目名称:mypowerscgl,代码行数:30,代码来源:UCPS_XLSec.cs

示例14: gridViewOperation_BeforeUpdate

        void gridViewOperation_BeforeUpdate(object render, ObjectOperationEventArgs<PS_gt> e) {
            e.Cancel = true;
            try {
                PS_gt gt =e.Value;
                frmgtEdit frm = gridViewOperation.EditForm as frmgtEdit;
                PS_Image image = frm.GetPS_Image();
                if (frm.GetImage() != null ) {
                    if (gt.ImageID == "" || image==null) {
                        image = new PS_Image();
                        image.ImageName = "杆塔照片";
                        image.ImageType = "gt";
                        image.ImageData = (byte[])frm.GetImage();
                        gt.ImageID = image.ImageID;
                         Client.ClientHelper.PlatformSqlMap.ExecuteTransationUpdate(image, gt, null);
                    } else {

                        Client.ClientHelper.PlatformSqlMap.ExecuteTransationUpdate(null,new object[] { gt, image },  null);
                    }
                   
                } else {
                    Client.ClientHelper.PlatformSqlMap.Update<PS_gt>(e.Value);
                }

                Ebada.Core.ConvertHelper.CopyTo(gt, e.ValueOld);
            } catch (Exception err) { throw err; }
        }
开发者ID:s7loves,项目名称:mypowerscgl,代码行数:26,代码来源:UCPS_GT.cs

示例15: gridViewOperation_BeforeInsert

 void gridViewOperation_BeforeInsert(object render, ObjectOperationEventArgs<PS_tq> e) {
     int count = ClientHelper.PlatformSqlMap.GetRowCount<PS_tq>(string.Format("where tqcode='{0}' ", e.Value.tqCode));
     if (count > 0) {
         MsgBox.ShowWarningMessageBox("台区代码重复!");
         e.Cancel = true;
         return;
     }
 }
开发者ID:s7loves,项目名称:mypowerscgl,代码行数:8,代码来源:UCPS_TQ.cs


注:本文中的ObjectOperationEventArgs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。