Ejemplo n.º 1
0
        /// <summary>
        /// 添加地点类型
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            Frm_AddressTypeDefine AddressTypeDefine = new Frm_AddressTypeDefine("", 0);

            AddressTypeDefine.ShowDialog();
            if (AddressTypeDefine.DialogResult == DialogResult.OK)
            {
                LoadAddressType();
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 编辑地点类型
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void barButtonItem2_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            int selectedHandle;

            selectedHandle = this.gridView1.GetSelectedRows()[0];
            if (selectedHandle >= 0)
            {
                string AddressTypeid = this.gridView1.GetRowCellValue(selectedHandle, "ID").ToString();
                Frm_AddressTypeDefine AddressTypeDefine = new Frm_AddressTypeDefine(AddressTypeid, 1);
                AddressTypeDefine.ShowDialog();
                if (AddressTypeDefine.DialogResult == DialogResult.OK)
                {
                    LoadAddressType();
                }
            }
        }
Ejemplo n.º 3
0
        private void gridView_MouseDown(object sender, MouseEventArgs e)
        {
            try
            {
                GridHitInfo hInfo = gridView1.CalcHitInfo(new Point(e.X, e.Y));
                if (e.Button == MouseButtons.Left && e.Clicks == 2)
                {
                    int     rowIndex      = gridView1.FocusedRowHandle;
                    DataRow dr            = gridView1.GetDataRow(rowIndex);
                    string  AddressTypeID = dr["ID"].ToString();

                    Frm_AddressTypeDefine fa = new Frm_AddressTypeDefine(AddressTypeID, 1);
                    fa.ShowDialog();
                }
            }
            catch (Exception ex)
            {
                LogHelper.Error(ex);
            }
        }