예제 #1
0
    private void BindData()
    {
        inputReceiptAction inputReceiptAction = new inputReceiptAction();

        this.dgItemList.DataSource = this.GetPageData(inputReceiptAction.GetPlanItemInfos(this.MainID));
        this.dgItemList.DataBind();
    }
예제 #2
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        inputReceiptYear   inputReceiptYear   = new inputReceiptYear();
        inputReceiptAction inputReceiptAction = new inputReceiptAction();

        inputReceiptYear.ExaminePeople = this.txtExaminePeople.Text;
        inputReceiptYear.ExamineTime   = DateTime.Parse(this.txtExamineTime.Text);
        inputReceiptYear.Remark        = this.txtRemark.Text;
        inputReceiptYear.SerialNumber  = this.txtSerialNumber.Text;
        inputReceiptYear.TabPeople     = this.txtTabPeople.Text;
        inputReceiptYear.TabTime       = DateTime.Parse(this.txtTabTime.Text);
        inputReceiptYear.PrjCode       = this.prjCode;
        inputReceiptYear.PlanYear      = this.ddlPlanYear.SelectedValue;
        if (this.ViewState["MAINID"] != null)
        {
            inputReceiptYear.MainId = int.Parse(this.ViewState["MAINID"].ToString());
        }
        if (inputReceiptAction.SaveYearPlan(inputReceiptYear))
        {
            this.js.Text = "alert(\"操作成功!\");";
        }
        else
        {
            this.js.Text = "alert(\"操作失败!\");";
        }
        this.BindData(inputReceiptYear);
    }
예제 #3
0
    private void BindData()
    {
        this.hidMainId.Value = "";
        inputReceiptAction inputReceiptAction = new inputReceiptAction();

        this.dgYearPlanList.DataSource = this.GetPageData(inputReceiptAction.GetYearPlanInfos(this.PrjCode));
        this.dgYearPlanList.DataBind();
    }
예제 #4
0
    protected void btnNew_Click(object sender, EventArgs e)
    {
        inputReceiptAction inputReceiptAction = new inputReceiptAction();

        if (inputReceiptAction.CreateNewItem(this.MainID) == null)
        {
            this.js.Text = "alert(\"操作失败,请检查数据库操作语句!\");";
        }
        this.BindData();
    }
예제 #5
0
    private void BindData()
    {
        inputReceiptAction inputReceiptAction = new inputReceiptAction();
        inputReceiptYear   inputReceiptYear   = new inputReceiptYear();

        if (this.ViewState["MAINID"] != null)
        {
            inputReceiptYear = inputReceiptAction.GetYearPlanInfo(this.ViewState["MAINID"].ToString());
        }
        else
        {
            inputReceiptYear = inputReceiptAction.GetYearPlanInfo("");
        }
        this.txtExaminePeople.Text   = inputReceiptYear.ExaminePeople;
        this.txtExamineTime.Text     = inputReceiptYear.ExamineTime.ToShortDateString();
        this.txtExamineTime.ReadOnly = true;
        this.txtRemark.Text          = inputReceiptYear.Remark;
        this.txtSerialNumber.Text    = inputReceiptYear.SerialNumber;
        this.txtTabPeople.Text       = inputReceiptYear.TabPeople;
        this.txtTabTime.Text         = inputReceiptYear.TabTime.ToShortDateString();
    }
예제 #6
0
    private void BindDropDownList(string MainID)
    {
        inputReceiptAction inputReceiptAction = new inputReceiptAction();
        DataTable          existPlanYear      = inputReceiptAction.GetExistPlanYear("");
        string             text = "";

        for (int i = DateTime.Today.Year - 10; i < DateTime.Today.Year + 10; i++)
        {
            bool flag = false;
            for (int j = 0; j < existPlanYear.Rows.Count; j++)
            {
                if (MainID == "")
                {
                    if (i.ToString() == existPlanYear.Rows[j][0].ToString())
                    {
                        flag = true;
                    }
                }
                else
                {
                    inputReceiptYear yearPlanInfo = inputReceiptAction.GetYearPlanInfo(MainID);
                    text = yearPlanInfo.PlanYear;
                    if (i.ToString() == existPlanYear.Rows[j][0].ToString() && i.ToString() != yearPlanInfo.PlanYear)
                    {
                        flag = true;
                    }
                }
            }
            if (!flag)
            {
                this.ddlPlanYear.Items.Add(new System.Web.UI.WebControls.ListItem(i.ToString() + "年度", i.ToString()));
            }
        }
        if (text != "")
        {
            this.ddlPlanYear.SelectedValue = text;
        }
    }