public PB_RemainLoader_Spot(String accountName, String password, Account account) { // ELW 잔고 얻기 try { _dsc = new DepositServerClass(); _dsc.ReceiveResultFund += new _IDepositServerEvents_ReceiveResultFundEventHandler(dsc_ReceiveResultFund); _dsc.ReceiveMessage += new _IDepositServerEvents_ReceiveMessageEventHandler(dsc_ReceiveMessage); _accountName = accountName; _shortAccountName = accountName.Substring(accountName.Length - 6); _password = password; _account = account; } catch (System.Exception ex) { logger.Error(ex.ToString()); Util.KillWithNotice(ex.ToString()); } }
void RequestOptionRemains() { dsc = new DepositServerClass(); dsc.ReceiveResultFund += new _IDepositServerEvents_ReceiveResultFundEventHandler(dsc_ReceiveResultFund); dsc.ReceiveMessage += new _IDepositServerEvents_ReceiveMessageEventHandler(dsc_ReceiveMessage); // dsc.ReceiveResult += new _IBizConcServerEvents_ReceiveResultEventHandler(bizServer_ReceiveResult); //dsc.SetViewType(cSTOCK_UNITY, cDT_OUTTYPE_REMAIN); // 잔고 //bizServer = new BizConcServer(); //bizServer.ReceiveMessage += new _IBizConcServerEvents_ReceiveMessageEventHandler(bizServer_ReceiveMessage); //bizServer.ReceiveResult += new _IBizConcServerEvents_ReceiveResultEventHandler(bizServer_ReceiveResult); //bizServer.SetViewType(cFUTOPT_UNITY, cDT_OUTTYPE_REMAIN); // 잔고 //bizServer.AddRepeatDataAll(); //bizServer.SetReceiveReal(true); // 계좌번호 String sAccount = textBox1.Text.Trim(); // 비밀번호 String sPassword = textBox2.Text.Trim(); // 필수입력항목 검사 if (sAccount.Length == 0) { MessageBox.Show("계좌번호를 입력하세요"); return; } if (sPassword.Length == 0) { MessageBox.Show("비밀번호를 입력하세요"); return; } // 조회 전송 //bizServer.SetReceiveReal(true); // bizServer.SendReceive(sAccount, sPassword); dsc.SetViewType(2, 0); // (첫째인수)0:주식 1:선물옵션 2.상품현물(두번째 인수는 미사용) dsc.SendReceive(sAccount, sPassword); //비밀번호는 안넣으셔도 됩니다. }
private void button2_Click(object sender, EventArgs e) { // ELW 잔고 얻기 try { _dsc = new DepositServerClass(); _dsc.ReceiveResultFund += new _IDepositServerEvents_ReceiveResultFundEventHandler(dsc_ReceiveResultFund); _dsc.ReceiveMessage += new _IDepositServerEvents_ReceiveMessageEventHandler(dsc_ReceiveMessage); // 계좌번호 String sAccount = textBox2.Text.Trim(); // 비밀번호 String sPassword = textBox4.Text.Trim(); // 필수입력항목 검사 if (sAccount.Length == 0) { MessageBox.Show("계좌번호를 입력하세요"); return; } if (sPassword.Length == 0) { MessageBox.Show("비밀번호를 입력하세요"); return; } _dsc.SetViewType(2, 0); // (첫째인수)0:주식 1:선물옵션 2.상품현물(두번째 인수는 미사용) _dsc.SendReceive(sAccount, sPassword); //비밀번호는 안넣으셔도 됩니다. } catch (System.Exception ex) { logger.Warn(ex.ToString()); } }