public async Task <TransactionResult> GenericTransaction(Contract contract, Web3 web3, string sender, string functionName, params object[] inputs)
        {
            var    func   = contract.GetFunction(functionName);
            string txHash = null;

            try
            {
                txHash = await func.SendTransactionAsync(sender, new HexBigInteger(Constants.DEFAULT_GAS), new HexBigInteger(Constants.DEFAULT_VALUE), inputs);
            }
            catch (Nethereum.JsonRpc.Client.RpcResponseException)
            {
                throw;
            }
            return(await ContractFacade.TryGetReceipt(web3, txHash));
        }
Exemplo n.º 2
0
        private void sbtnOK_Click(object sender, System.EventArgs e)
        {
            //保存
            if (!SOValidate())
            {
                return;
            }
            Entity.BusiLog bl = new CMSM.Entity.BusiLog();
            bl.cnvcDeptID   = CMSMData.CMSMDataAccess.SysInitial.LocalDeptID;
            bl.cnvcDeptName = CMSMData.CMSMDataAccess.SysInitial.LocalDeptName;
            bl.cnvcOperName = CMSMData.CMSMDataAccess.SysInitial.CurOps.strOperName;
            ContractFacade cf = new ContractFacade();

            try
            {
                switch (_flag)
                {
                case OperFlag.ADD:
                    Entity.SpecialOilDept so = new SpecialOilDept();
                    so.cnvcContractNo      = this.textBox1.Text;
                    so.cnvcDeliveryCompany = this.textBox2.Text;

                    cf.SOADD(so, bl);
                    cf.SOSync(CMSMData.CMSMDataAccess.SysInitial.LocalDeptNameTmp);
                    MessageBox.Show(this, "专供油合同添加成功");
                    break;

                case OperFlag.MOD:
                    //Entity.SpecialOilDept so = new SpecialOilDept();
                    _so.cnvcContractNo      = this.textBox1.Text;
                    _so.cnvcDeliveryCompany = this.textBox2.Text;
                    cf.SOMOD(_so, bl);
                    cf.SOSync(CMSMData.CMSMDataAccess.SysInitial.LocalDeptNameTmp);
                    MessageBox.Show(this, "专供油合同修改成功");
                    break;
                }
                LoadPara();
            }
            catch (Exception ex)
            {
                MessageBox.Show(this, ex.Message, "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 3
0
        public IEnumerable <Contract> Get(long okato, int year, string okpd)
        {
            var facade = new ContractFacade();

            return(facade.GetContractsByOkatoAndYearAndOkpd(okato, year, okpd));
        }
Exemplo n.º 4
0
        public IEnumerable <Contract> Get(long okato, int year)
        {
            var facade = new ContractFacade();

            return(facade.GetContractsByOkatoAndYear(okato, year));
        }
Exemplo n.º 5
0
        public IEnumerable <Contract> Get(long okato)
        {
            var facade = new ContractFacade();

            return(facade.GetContractsByOkato(okato));
        }
Exemplo n.º 6
0
        public IEnumerable <Contract> Get()
        {
            var facade = new ContractFacade();

            return(facade.GetContracts());
        }