Esempio n. 1
0
        //�½�����
        private void barAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            SysDataServer ds = new SysDataServer();
            ds.Sort = gridView1.RowCount + 1;
            ds.ServerAddress = ServicesSys.GetServerAddress;
            ds.ServerUser=ServicesSys.GetUid;
            ds.ServerPwd = ServicesSys.GetPwd;

            FrmSysDataAdd frm = new FrmSysDataAdd();

            frm.sds = ds;
            frm.Text = "��������";
            if (frm.ShowDialog()==DialogResult.OK)
            {
                ds = frm.sds;
                ServicesSys.BaseService.Create<SysDataServer>(ds);
                InitData();

            }
        }
Esempio n. 2
0
        //新建城市
        private void barAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            SysDataServer ds = new SysDataServer();

            ds.Sort          = gridView1.RowCount + 1;
            ds.ServerAddress = ServicesSys.GetServerAddress;
            ds.ServerUser    = ServicesSys.GetUid;
            ds.ServerPwd     = ServicesSys.GetPwd;



            FrmSysDataAdd frm = new FrmSysDataAdd();

            frm.sds  = ds;
            frm.Text = "新增城市";
            if (frm.ShowDialog() == DialogResult.OK)
            {
                ds = frm.sds;
                ServicesSys.BaseService.Create <SysDataServer>(ds);
                InitData();
            }
        }
Esempio n. 3
0
        //编辑
        private void barEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (gridView1.RowCount < 1)
            {
                return;
            }
            if (gridView1.FocusedRowHandle < 0)
            {
                return;
            }
            SysDataServer ds  = gridView1.GetRow(gridView1.FocusedRowHandle) as SysDataServer;
            FrmSysDataAdd frm = new FrmSysDataAdd();

            frm.sds  = ds;
            frm.Text = "编辑城市";
            if (frm.ShowDialog() == DialogResult.OK)
            {
                ds = frm.sds;
                ServicesSys.BaseService.Update <SysDataServer>(ds);
                InitData();
            }
        }
Esempio n. 4
0
        //�༭
        private void barEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (gridView1.RowCount<1)
            {
                return;
            }
            if (gridView1.FocusedRowHandle<0)
            {
                return;
            }
            SysDataServer ds = gridView1.GetRow(gridView1.FocusedRowHandle) as SysDataServer;
            FrmSysDataAdd frm = new FrmSysDataAdd();
            frm.sds = ds;
            frm.Text = "�༭����";
            if (frm.ShowDialog() == DialogResult.OK)
            {
                ds = frm.sds;
                ServicesSys.BaseService.Update<SysDataServer>(ds);
                InitData();

            }
        }