示例#1
0
        protected void Gv_DataBind()
        {
            List<ExtendModule.ApplicationOther> ls = new List<ExtendModule.ApplicationOther>();
            ExtendBLL.ApplicationOther Application = new ExtendBLL.ApplicationOther();

            ls = Application.GetModelList2(CombinString());
            Gv_Task.DataSource = ls;
            Gv_Task.DataBind();

            int totalMoney = 0;
            for (int n = 0; n < ls.Count; n++)
            {
                totalMoney += Convert.ToInt32(ls[n].App_ApproveFinancing);
            }
            lb_TotalMoney.Text = totalMoney.ToString();
        }
示例#2
0
        protected void DataBinds()
        {
            if (HF_QueryString != QueryString || QueryString <= 0)
            {
                Page.ClientScript.RegisterClientScriptBlock(GetType(), "script", "<script type='text/javascript'>window.location.href='~/err.aspx?Message=��ѯ�ַ�������';</script>");
                return;
            }

            ExtendBLL.ApplicationOther Application = new ExtendBLL.ApplicationOther();

            ExtendModule.ApplicationOther model = new ExtendModule.ApplicationOther();
            model = Application.GetModelList2("ProjectApp.ID=" + QueryString.ToString())[0];

            LabMS.BLL.DictionaryClass DicClass = new LabMS.BLL.DictionaryClass();
            LabMS.Model.DictionaryClass ds = new LabMS.Model.DictionaryClass();
            LabMS.BLL.Dictionary Dic = new LabMS.BLL.Dictionary();
            List<LabMS.Model.Dictionary> lsDic = new List<LabMS.Model.Dictionary>();

            lsDic = Dic.GetModelList("Code='" + model.App_Positions.Trim() + "'");

            if (lsDic.Count == 1)
            {
                tb_Position.Text = lsDic[0].Name;
            }

            tb_Code.Text = model.App_ProjectCode;
            tb_Name.Text = model.App_Code;
            ddl_Lab.Text = model.Lab_Name;
            ddl_LabType.Text = model.LabType_Name;
            ddl_ConType.Text = model.ConType_Name;
            if (model.App_AppTime != null)
            {
                tb_AppTime.Text = model.App_AppTime.Value.ToShortDateString();
            }
            if (model.App_CompletionTime != null)
            {
                tb_CompletionTime.Text = model.App_CompletionTime.Value.ToShortDateString();
            }
            tb_InCharge.Text = model.App_InCharge;
            tb_ApplyFinancing.Text = model.App_ApplyFinancing.ToString();
            tb_AppView.Text = model.App_ArgumentView;
            tb_Phone.Text = model.App_Phone;

            tb_Loction.Text = model.App_Location;
            tb_InstallCondition.Text = model.App_InstallCondition;
            tb_Necessity.Text = model.App_Necessity;

            lsDic = Dic.GetModelList("DClass='Conclusion'");

            ddl_Conclusion.DataSource = lsDic;
            ddl_Conclusion.DataValueField = "Code";
            ddl_Conclusion.DataTextField = "Name";
            ddl_Conclusion.DataBind();
            ddl_Conclusion.Items.Insert(0, new ListItem("--��ѡ����֤����--", "0"));

            string value = "";
            if (ddl_Conclusion.Items.FindByValue(model.App_ArgumentConclusion) != null)
            {
                ddl_Conclusion.Items.FindByValue(model.App_ArgumentConclusion).Selected = true;
                value = ddl_Conclusion.SelectedItem.Text;
            }

            lb_ApproveFinancing.Text = model.App_ApproveFinancing.ToString();
            lb_Conclusion.Text = value;
            lb_AppView.Text = model.App_ArgumentView;

            switch (model.App_State)
            {
                case "Approved":
                    {

                        lb_AppView.Text = model.App_ArgumentView;
                        lb_ApproveFinancing.Text = model.App_ApproveFinancing.Value.ToString();
                        lb_Conclusion.Text = "ͨ����֤";
                        Submit.Visible = false;
                        add_conclusion.Attributes.Add("style", "display:none");
                    }
                    break;
                case "Submitted":
                    {
                        show_conclusion.Attributes.Add("style", "display:none");
                        tb_ApproveFinancing.Visible = false;
                        tb_AppView.Visible = false;

                    }
                    break;
                case "Rejected":
                    {
                        Submit.Visible = true;
                        show_conclusion.Attributes.Add("style", "display:none");
                    }
                    break;

                default:
                    {
                        add_conclusion.Attributes.Add("style", "display:none");
                        Submit.Visible = false;
                        show_conclusion.Attributes.Remove("style");
                        break;
                    }
            }
        }
示例#3
0
        protected void DataBinds()
        {
            int QueryID = 0;
            if (int.TryParse(Request.QueryString["ID"].ToString(), out QueryID))
            {
                if (HFQueryString != QueryID)
                {
                    Page.ClientScript.RegisterClientScriptBlock(GetType(), "script", "<script type='text/javascript'>window.location.href='err.aspx?Message=��ѯ�ַ�������'</script>'");
                    return;
                }
                ExtendBLL.ApplicationOther Application = new ExtendBLL.ApplicationOther();
                ExtendModule.ApplicationOther model = new ExtendModule.ApplicationOther();
                try
                {
                    model = Application.GetModelList2("ProjectApp.ID=" + QueryID)[0];
                }
                catch
                {
                    Page.ClientScript.RegisterClientScriptBlock(GetType(), "script", "<script type='text/javascript'>alert('��ѯ�ַ�������,�����б�');window.location.href='';</script>'");
                    return;
                }

                lb_Code.Text = model.App_ProjectCode;
                lb_Name.Text = model.App_Code;
                lb_LabType.Text = model.LabType_Name;
                lb_ConType.Text = model.ConType_Name;
                lb_AppTime.Text = model.App_AppTime.Value.ToShortDateString();
                lb_ComTme.Text = model.App_CompletionTime.Value.ToShortDateString();
                lb_InCharge.Text = model.App_InCharge;
                lb_Position.Text = model.PositionName;
                lb_Finace.Text = model.App_ApplyFinancing.ToString();
                lt_Place.Text = model.App_Location;
                lt_Condition.Text = model.App_InstallCondition;
                lt_Nes.Text = model.App_Necessity;
                lb_Phone.Text = model.App_Phone;
                tb_ID.Value=QueryID.ToString();
                lb_State.Text = model.State_Name;

                lb_Lab.Text = model.Lab_Name;

                if (model.App_State == "SubmitNotYet" || model.App_State == "Submitted")
                {
                    if (model.App_State == "SubmitNotYet")
                    {
                        btn_Submit.Visible = true;
                        btn_Cancle.Visible = false;
                        edit.Visible = true;
                        btn_Delete.Visible = true;

                    }
                    else if (model.App_State == "Submitted")
                    {
                        btn_Submit.Visible = false;
                        btn_Cancle.Visible = true;
                        btn_Delete.Visible = false;
                        edit.Visible = false;
                    }
                }
                else
                {
                    btn_Submit.Visible = false;
                    btn_Cancle.Visible = false;
                    edit.Visible = false;
                    btn_Delete.Visible = false;

                }

            }
        }
 protected void Gv_DataBinds()
 {
     ExtendBLL.ApplicationOther App = new ExtendBLL.ApplicationOther();
     List<ExtendModule.ApplicationOther> ls = new List<ExtendModule.ApplicationOther>();
     ls = App.GetModelList2(CombineStr());
     Gv_App.DataSource = ls;
     Gv_App.DataBind();
 }
示例#5
0
        protected void Gv_DataBind()
        {
            List<ExtendModule.ApplicationOther> ls = new List<ExtendModule.ApplicationOther>();
            ExtendBLL.ApplicationOther Application = new ExtendBLL.ApplicationOther();

            ls = Application.GetModelList2(CombinString());
            gv_AppList.DataSource = ls;
            gv_AppList.DataBind();
        }
示例#6
0
        protected void DataBinds()
        {
            if (QueryString != HF_QueryString || QueryString <= 0 || HF_QueryString <= 0)
            {
                Page.ClientScript.RegisterClientScriptBlock(GetType(), "script", "<script type='text/javascript>alert('��ѯ�ַ�������');window.location.href='';</script>");
                return;
            }

            ExtendBLL.ApplicationOther Application = new ExtendBLL.ApplicationOther();
            ExtendModule.ApplicationOther model;
            try
            {
                model = new ExtendModule.ApplicationOther();
                model = Application.GetModelList2(" ProjectApp.ID=" + QueryString.ToString())[0];
            }
            catch
            {
                Page.ClientScript.RegisterClientScriptBlock(GetType(), "script", "<script type='text/javascript>window.location.href='err.aspx?Message=��ѯ�ַ�������'</script>");
                return;
            }
            tb_Code.Text = model.App_ProjectCode;
            tb_Name.Text = model.App_Code;
            ddl_Lab.Text = model.Lab_Name;
            ddl_LabType.Text = model.LabType_Name;
            ddl_ConType.Text = model.ConType_Name;
            if (model.App_AppTime != null)
            {
                tb_AppTime.Text = model.App_AppTime.Value.ToShortDateString();
            }
            if (model.App_CompletionTime != null)
            {
                tb_CompletionTime.Text = model.App_CompletionTime.Value.ToShortDateString();
            }
            tb_InCharge.Text = model.App_InCharge;
            tb_Phone.Text = model.App_Phone;
            tb_ApplyFinancing.Text = model.App_ApplyFinancing.ToString();
            tb_ApproveFinancing.Text = model.App_ApproveFinancing.ToString();
            tb_Loction.Text = model.App_Location;
            tb_InstallCondition.Text = model.App_InstallCondition;
            tb_Necessity.Text = model.App_Necessity;
            tb_AppView.Text = model.App_ArgumentView;

            tb_Position.Text = model.PositionName;

            ddl_State.Text = model.State_Name;
        }