コード例 #1
0
ファイル: AppTaskList.aspx.cs プロジェクト: dalinhuang/labms
        protected void Gv_Task_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {

                e.Row.Attributes["style"] = "Cursor:pointer";
                int itemp = e.Row.Cells.Count;
                for (int i = 1; i < itemp; i++)
                {
                    e.Row.Cells[i].Attributes.Add("OnDblClick", "window.location.href='AppTask.aspx?ID=" + Gv_Task.DataKeys[Gv_Task.DataKeys.Count - 1].Value.ToString() + " '");
                }

                int code = e.Row.RowIndex + 1;
                e.Row.Cells[0].Text = code.ToString();

                ExtendBLL.ApplicationAndItem Application = new ExtendBLL.ApplicationAndItem();
                int ID=0;
                bool visible = false;
                if (int.TryParse(Gv_Task.DataKeys[e.Row.RowIndex].Value.ToString(), out ID))
                {
                    if (ID > 0)
                    {
                        if (Application.CoutAttachmentItem(ID,"2") > 0)
                        {
                            visible = true;
                        }
                    }
                }

                Button btn = (Button)e.Row.FindControl("Build");
                if (btn != null)
                {
                    if (e.Row.Cells[10].Text == "��֤ͨ��" && visible)
                    {
                        btn.Visible = true;
                    }
                    else
                    {
                        btn.Visible = false;
                    }
                }

            }
        }
コード例 #2
0
ファイル: AppTaskList.aspx.cs プロジェクト: dalinhuang/labms
        protected void Search_Click(object sender, EventArgs e)
        {
            List<ExtendModule.ApplicationOther> ls = new List<ExtendModule.ApplicationOther>();
            ExtendBLL.ApplicationAndItem Application = new ExtendBLL.ApplicationAndItem();
            string Has = "";
            if (ddl_Has.SelectedValue == "0")
            {
                Has = "yes";
            }
            else if (ddl_Has.SelectedValue=="1")
            {
                Has = "no";
            }

            if (ddl_Has.SelectedValue == "2")
            {

            }
            if (!string.IsNullOrEmpty(Has))
            {
                ls = Application.GetModelList2(CombinString(), Has);
                Gv_Task.DataSource = ls;
                Gv_Task.DataBind();
            }
            else
            {
                Gv_DataBind();
            }

            int totalMoney = 0;
            for (int n = 0; n < ls.Count; n++)
            {
                totalMoney += Convert.ToInt32(ls[n].App_ApproveFinancing);
            }
            lb_TotalMoney.Text = totalMoney.ToString();
        }
コード例 #3
0
ファイル: AppTask.aspx.cs プロジェクト: dalinhuang/labms
        protected void Page_Load(object sender, EventArgs e)
        {
            strPagePrivilege.Add("JSXMRWS");
            strPagePrivilege.Add("mana");

            if (!Page.IsPostBack)
            {
                if (Request.QueryString["ID"] != null)
                {

                        int ID = 0;
                        if (int.TryParse(Request.QueryString["ID"], out ID))
                        {
                            if (ID > 0)
                            {
                                HF_QueryString = ID;

                                DataBinds();

                                AttachItemDataBind();

                                ExtendBLL.ApplicationAndItem Application = new ExtendBLL.ApplicationAndItem();
                                LabMS.BLL.ProjectApp application=new LabMS.BLL.ProjectApp();
                                LabMS.Model.ProjectApp model=application.GetModel(ID);

                                if(model!=null)
                                {
                                    if (model.App_State == "Approved"&&Application.CoutAttachmentItem(ID,"2")>0)
                                    {
                                        Build.Visible = true;

                                    }
                                    else
                                    {
                                        Build.Visible = false;

                                    }

                                    if (model.App_State == "Approved")
                                    {
                                        edit.Visible = true;
                                    }
                                    else
                                    {
                                        edit.Visible = false;
                                    }
                                }

                            }
                        }

                }
                else
                {
                    LabMS.Common.JShelper.JSAlert(this, "��ѯ�ַ�������", "��ѯ�ַ�������Ϊ��");
                    return;
                }

            }
        }