Пример #1
0
        public static TransferRule MakeTransferRule()
        {
            TransferRule aMockRule = new TransferRule();

            aMockRule.RuleName = "新建数据迁移策略";
            DbTransfer dt = new DbTransfer();

            dt.DbName = _RestoreDbName;
            TableTransfer tt = new TableTransfer();

            tt.TableName = _MainTableName;
            dt.AddTransferTable(tt);
            aMockRule.DbsToTransfer.Add(dt);

            return(aMockRule);
        }
Пример #2
0
        private void btntabletransfer_Click(object sender, EventArgs e)
        {
            DataTable dt_user = blu.getusername(Login.sendtext);

            if (dt_user.Rows.Count > 0)
            {
                DataTable dtm = blu.get_user_and_type_inner(Convert.ToInt32(dt_user.Rows[0]["user_id"].ToString()));
                if (dtm.Rows.Count > 0)
                {
                    if (dtm.Rows[0]["tabletransfer"].ToString() == "True")
                    {
                        TableTransfer tar = new TableTransfer();
                        tar.ShowDialog();
                    }
                    else
                    {
                        MessageBox.Show("You Dont Have Access To Table Transfer ALert !!", "No Access Alert !!");
                    }
                }
            }
        }