Example #1
0
        public void fillformWithObj(InterDepository obj)
        {
            try
            {

               //Button myButton =
                txtdpid.Text = obj.id_clientid;
                //GetDpName();
                txtSettNo.Text = obj.id_settlementno;
                ddlType.SelectedValue = obj.id_type;
                txtbocmid.Text = obj.id_branchbatchcd;
                txtcdslstlmnt.Text = obj.id_CDSLsettlement;
                txtrate.Text = obj.sc_rate;
                txtisinCode_TXT_POSTBACK.Text = obj.id_isin;
                //GetISINName();
                txtqty.Text = obj.id_qty.ToString(); ;
                txtValue.Text = obj.id_value;
                cmbReason.SelectedValue = obj.id_reasonForTrade;
                txtRemark.Text = obj.id_remarks;
            }
            catch (Exception ex)
            {

            }
        }
Example #2
0
        public void getDetails(int index = 0)
        {
            try
            {
                Boolean isAllOk = true;
                Validate _validate = new Validate();
                InterDepository obj = new InterDepository();
                if (_validate.isValidInput(txtExecutionDt, 10))
                {
                    obj.id_executiondate = _validate.convertDatetime(txtExecutionDt.Text.Trim());
                }
                else
                {
                    isAllOk = false;
                    showError("Invalid Execution date");
                }

                if (_validate.isValidInput(txtTransactionDt, 10))
                {
                    obj.id_trxdate = _validate.convertDatetime(txtTransactionDt.Text.Trim());
                }
                else
                {
                    isAllOk = false;
                    showError("Invalid Transction date");
                }

                if (_validate.isNotNumber(txtInternalRefNo))
                {
                    isAllOk = false;
                    showError("Invalid Internal number");
                }
                else
                {
                    obj.id_internalrefno = txtInternalRefNo.Text.Trim();
                }

                if (_validate.isNotNumber(txtslipno))
                {
                    isAllOk = false;
                    showError("Invalid slip number");
                }
                else
                {
                    obj.id_settlementno = txtslipno.Text.Trim();
                }

                if (_validate.isNotSelected(cmbInstructionType))
                {
                    isAllOk = false;
                    showError("Invalid Instruction selection");
                }

                else
                {
                    obj.id_instcd = cmbInstructionType.SelectedValue;
                }

                if (_validate.isNotNumber(txtlotno))
                {
                    isAllOk = false;
                    showError("Invalid Lot No");
                }
                else
                {
                    obj.id_lotno = Convert.ToInt32(txtlotno.Text.Trim());
                }

                if (_validate.isEmpty(txtClientId))
                {
                    isAllOk = false;
                    showError("Invalid Client ID");
                }
                else
                {
                    obj.id_clientid = txtClientId.Text.Trim();
                    obj.id_otherclientid = txtClientId.Text.Trim();
                }

                if (_validate.isNotSelected(cmbReceiptMode))
                {
                    isAllOk = false;
                    showError("Invalid Recieving mode");
                }
                else
                {
                    obj.id_instreceivemode = cmbReceiptMode.SelectedValue;
                }

                if (_validate.isEmpty(txtdpid))
                {
                    isAllOk = false;
                    showError("Invalid DP ID");
                }
                else
                {
                    obj.id_otherdpid = txtdpid.Text.Trim();
                }
                if (_validate.isEmpty(txtSettNo))
                {
                    isAllOk = false;
                    showError("Invalid Settlemtnt No");
                }
                else
                {
                    obj.id_settlementno = txtSettNo.Text.Trim();
                }

                if (_validate.isNotSelected(ddlType))
                {
                    isAllOk = false;
                    showError("Invalid Type");
                }
                else
                {
                    obj.id_type = ddlType.SelectedValue;
                }

                if (_validate.inValidString(txtbocmid.Text.Trim(),8))
                {
                    isAllOk = false;
                    showError("Invalid bocmid");
                }

                else
                {
                    obj.id_branchbatchcd = txtbocmid.Text.Trim();
                }

                if (_validate.isEmpty(txtcdslstlmnt))
                {
                    isAllOk = false;
                    showError("Invalid CD SL settlement");
                }

                else
                {
                    obj.id_CDSLsettlement = txtcdslstlmnt.Text.Trim();
                }

                if (_validate.isEmpty(txtisinCode_TXT_POSTBACK))
                {
                    isAllOk = false;
                    showError("Invalid ISIN Number");
                }

                else
                {
                    obj.id_isin = txtisinCode_TXT_POSTBACK.Text.Trim();
                }

                if (_validate.isNotNumber(txtqty))
                {
                    isAllOk = false;
                    showError("Invalid Quantity");
                }

                else
                {
                    obj.id_qty = Convert.ToInt32(txtqty.Text.Trim());
                }

                if (_validate.isNotSelected(cmbReason))
                {
                    isAllOk = false;
                    showError("Invalid Reason");
                }
                else
                {
                    obj.id_reasonForTrade = cmbReason.SelectedValue;
                }
                if (_validate.isEmpty(txtRemark))
                {
                    isAllOk = false;
                    showError("Invalid Remarks");
                }
                else
                {
                    obj.id_remarks = txtRemark.Text.Trim();
                }

                if (isAllOk == true)
                {
                    AuthMaster objj = new AuthMaster();
                    int level = new AuthMaster().Authorise(Convert.ToDecimal(obj.id_value),obj.id_instcd);
                    showError("Authorization level is : "+ level.ToString());

                    obj.id_trxdate = _validate.convertDatetime(DateTime.Now.ToString("yyyy-MM-dd"));
                    obj.id_trxtype = "925";
                    obj.id_trxflag = "";
                    obj.id_allow = "S";
                    obj.id_mkttype = "";
                    obj.id_status = "6";
                    obj.sc_rate = txtrate.Text;
                    obj.id_value = txtValue.Text;
                    obj.id_authtm1 = "00:00:00";
                    obj.id_authtm2 = "00:00:00";
                    obj.id_authtm3 = "00:00:00";
                    obj.id_instreceivemode = "S";
                    obj.id_recoslipyn = "N";
                    obj.id_entrymode = "C";
                    //obj.id_pri_key = 0;
                    obj.id_othersettlement = "";

                    obj.id_branchcd = new Process().GetSystemParameter("BRCODE");

                    if (Session["obj"] != null)
                        objs = (List<InterDepository>)Session["obj"];
                    if (Session["Index"] == null)
                    {
                        objs.Add(obj);
                    }
                    else
                    {
                        objs[Convert.ToInt32(Session["Index"])] = obj;
                        Session["Index"] = null;
                    }
                    Session["obj"] = objs;
                    GrdOnMarket.DataSource = objs;
                    GrdOnMarket.DataBind();
                    ClearFields2("");

                }

            }
            catch (Exception ex)
            {

            }
        }
Example #3
0
        public InterDepository GETInterDP(int int_pri_key)
        {
            try
            {
                SingleEntities db = new SingleEntities();
                Interdepository obj = db.Interdepositories.Where(x=>x.id_pri_key == int_pri_key).FirstOrDefault();
                InterDepository objIndp = new InterDepository();
                if(obj != null)
                {
                    objIndp.id_instcd = obj.id_instcd;
                    objIndp.id_trxdate = obj.id_trxdate;
                    objIndp.id_trxtype = obj.id_trxtype;
                    objIndp.id_trxflag = obj.id_trxflag;
                    objIndp.id_clientid = obj.id_clientid;
                    objIndp.id_isin = obj.id_isin;
                    objIndp.id_qty = obj.id_qty;
                    objIndp.id_mkttype = obj.id_mkttype;
                    objIndp.id_settlementno = obj.id_settlementno;
                    objIndp.id_executiondate = obj.id_executiondate;
                    objIndp.id_otherclientid = obj.id_otherclientid;
                    objIndp.id_otherdpid = obj.id_otherdpid;
                    objIndp.id_internalrefno = obj.id_internalrefno;
                    objIndp.id_cc_id = obj.id_cc_id;
                    objIndp.id_status = obj.id_status;
                    objIndp.id_allow = obj.id_allow;
                    objIndp.id_othersettlement = obj.id_othersettlement;
                    objIndp.id_authcode1 = obj.id_authcode1;
                    objIndp.id_authuserid1 = obj.id_authuserid1;
                    objIndp.id_authdate1 = obj.id_authdate1;
                    objIndp.id_authcode2 = obj.id_authcode2;
                    objIndp.id_authuserid2 = obj.id_authuserid2;
                    objIndp.id_authdate2 = obj.id_authdate2;
                    objIndp.id_batch_no = obj.id_batch_no;
                    //objIndp.id_pri_key = obj.id_pri_key;
                    objIndp.id_branchcd = obj.id_branchcd;
                    objIndp.id_branchbatchcd = obj.id_branchbatchcd;
                    objIndp.mkrid = obj.mkrid;
                    objIndp.mkrdt = obj.mkrdt;
                    objIndp.id_authcode3 = obj.id_authcode3;
                    objIndp.id_authuserid3 = obj.id_authuserid3;
                    objIndp.id_authdt3 = obj.id_authdt3;
                    objIndp.id_authremarks = obj.id_authremarks;
                    objIndp.id_scrollno = obj.id_scrollno;
                    objIndp.id_dqty = obj.id_dqty;
                    objIndp.id_lotno = obj.id_lotno;
                    objIndp.id_authtm1 = obj.id_authtm1;
                    objIndp.id_authtm2 = obj.id_authtm2;
                    objIndp.id_authtm3 = obj.id_authtm3;
                    objIndp.mkrtm = obj.mkrtm;
                    objIndp.id_instreceivemode = obj.id_instreceivemode;
                    objIndp.id_recoslipyn = obj.id_recoslipyn;
                    objIndp.id_entrymode = obj.id_entrymode;
                    objIndp.id_remarks = obj.id_remarks;
                    objIndp.id_CDSLsettlement = obj.id_CDSLsettlement;
                }

                return objIndp;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }