Exemple #1
0
        protected void TreeList_SelectedNodeChanged(object sender, EventArgs e)
        {
            if (TreeList.SelectedNode.Target != "0")
            {
                ddlAgreement.SelectedValue = TreeList.SelectedNode.Parent.Value;
                ContractBLL BLL = new ContractBLL();
                DataSet     ds  = ddlAgreement.SelectedValue == "0" ? BLL.GetList("AgreementID>=0") : BLL.GetList("AgreementID=" + ddlAgreement.SelectedValue);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    DropGetList.DataSource     = ds;
                    DropGetList.DataTextField  = "uname";
                    DropGetList.DataValueField = "ID";
                    DropGetList.DataBind();
                }
                else
                {
                    DropGetList.Items.Clear();
                    DropGetList.Items.Add(new ListItem("无接口", "0"));
                }
                TreeList.SelectedNode.Checked  = true;
                TreeList.SelectedNode.Selected = true;

                DropGetList.SelectedValue = TreeList.SelectedValue;
                SetCookies(ddlSolution.Text, DropGetList.Text);
                QueryResult();
            }
        }
Exemple #2
0
        private void BindContract(int slnID)
        {
            DropGetList.Items.Clear();
            ContractBLL BLL = new ContractBLL();
            DataSet     ds  = BLL.GetList("SlnID=" + slnID);

            if (ds.Tables[0].Rows.Count > 0)
            {
                DropGetList.DataSource     = ds;
                DropGetList.DataTextField  = "uname";
                DropGetList.DataValueField = "ID";
                DropGetList.DataBind();
            }
            string conId = ContractID;

            if (!string.IsNullOrEmpty(conId) && conId != "0")
            {
                try
                {
                    DropGetList.SelectedValue = conId;
                }
                catch
                {
                }
            }
        }
Exemple #3
0
        protected void TreeList_SelectedNodeChanged(object sender, EventArgs e)
        {
            if (TreeList.SelectedNode.Target != "0")
            {
                ddlAgreement.SelectedValue = TreeList.SelectedNode.Parent.Value;
                //ContractBLL BLL = new ContractBLL();
                int agreementId = ddlAgreement.SelectedValue.ToInt();
                var list        = DbDataLoader.GetContract(m =>
                {
                    if (agreementId > 0)
                    {
                        m.Condition = m.FormatExpression("AgreementID");
                        m.AddParam("AgreementID", agreementId);
                    }
                });
                if (list.Count > 0)
                {
                    DropGetList.DataSource     = list;
                    DropGetList.DataTextField  = "uname";
                    DropGetList.DataValueField = "ID";
                    DropGetList.DataBind();
                }
                else
                {
                    DropGetList.Items.Clear();
                    DropGetList.Items.Add(new ListItem("无接口", "0"));
                }
                TreeList.SelectedNode.Checked  = true;
                TreeList.SelectedNode.Selected = true;

                DropGetList.SelectedValue = TreeList.SelectedValue;
                SetCookies(ddlSolution.Text, DropGetList.Text);
                QueryResult();
            }
        }
Exemple #4
0
        private void BindContract(int slnID)
        {
            DropGetList.Items.Clear();
            var contractList = DbDataLoader.GetContract(slnID);

            if (contractList.Count > 0)
            {
                DropGetList.DataSource     = contractList;
                DropGetList.DataTextField  = "Uname";
                DropGetList.DataValueField = "ID";
                DropGetList.DataBind();
            }
            string conId = ContractID;

            if (!string.IsNullOrEmpty(conId) && conId != "0")
            {
                try
                {
                    DropGetList.SelectedValue = conId;
                }
                catch
                {
                }
            }
        }
Exemple #5
0
        protected void ddlAgreement_SelectedIndexChanged(object sender, EventArgs e)
        {
            var list = DbDataLoader.GetContractByAgreement(ddlSolution.SelectedValue.ToInt(), ddlAgreement.SelectedValue.ToInt());

            if (list.Count > 0)
            {
                DropGetList.DataSource     = list;
                DropGetList.DataTextField  = "uname";
                DropGetList.DataValueField = "ID";
                DropGetList.DataBind();
            }
            else
            {
                DropGetList.Items.Clear();
                DropGetList.Items.Add(new ListItem("无接口", "0"));
            }
        }
Exemple #6
0
        protected void ddlAgreement_SelectedIndexChanged(object sender, EventArgs e)
        {
            ContractBLL BLL = new ContractBLL();
            DataSet     ds  = ddlAgreement.SelectedValue == "0" ? BLL.GetList(" SlnID=" + this.ddlSolution.SelectedValue + " and AgreementID>=0") : BLL.GetList(" SlnID=" + this.ddlSolution.SelectedValue + " and  AgreementID=" + ddlAgreement.SelectedValue);

            if (ds.Tables[0].Rows.Count > 0)
            {
                DropGetList.DataSource     = ds;
                DropGetList.DataTextField  = "uname";
                DropGetList.DataValueField = "ID";
                DropGetList.DataBind();
            }
            else
            {
                DropGetList.Items.Clear();
                DropGetList.Items.Add(new ListItem("无接口", "0"));
            }
        }