Beispiel #1
0
    /// <summary>
    /// 設定編輯狀態下的各個控制項狀態
    /// </summary>
    private void ModeSetEdit()
    {
        CAAModel.CAACommon CAAComm = new CAAModel.CAACommon();
        CAAModel.MaintainDueRecord BCO = new CAAModel.MaintainDueRecord(ConntionDB);

        this.ButtonModify.Visible = true;

        if (ViewState["DUE_NO"] != null)
        { BindData(); }
        else
        { ErrorMsgLabel.Text = "查無資料"; }

        txtDUE_NO.ReadOnly = true;
        txtDUE_NO.CssClass = "readtxtbox";

        ParameterList.Clear();
        ParameterList.Add(CAAComm.GetValueSetParameter(this.txtDUE_NO.Text, "string", false));//應收應付單號

        int wash_amt;
        BCO.QueryWashData(ParameterList,out wash_amt);
        if (wash_amt==0)
        {
            this.SLP_SOURCE_TYPE.ReadOnly = false;
            SLP_STORE_ID.ReadOnly = false;
            SLP_ROOT_NO.ReadOnly = false;
            ddlTaxType.Enabled = true;
            ddlTaxType.CssClass = "";
            SLP_DUE_AMT.ReadOnly = false;
            SourceType_Change();
            this.txtCLOSE_MONTH.ReadOnly = false;
        }
        else
        {
            this.SLP_SOURCE_TYPE.ReadOnly = true;
            SLP_STORE_ID.ReadOnly = true;
            SLP_ROOT_NO.ReadOnly = true;
            ddlTaxType.Enabled = false;
            ddlTaxType.CssClass = "readtxtbox";
            SLP_DUE_AMT.ReadOnly = true;
            this.txtCLOSE_MONTH.ReadOnly = true;
        }

        txtRFNO.ReadOnly = true;
        txtRFNO.CssClass = "readtxtbox";
        SLP_SUM_DUE_AMT.ReadOnly = true;
        SLP_DUE_REMAIN_AMT.ReadOnly = true;
        SLP_CREATEDATE.ReadOnly = true;
        SLP_CREATEUID.ReadOnly = true;
        SLP_UPDATEDATE.ReadOnly = true;
        SLP_UPDATEUID.ReadOnly = true;

        txtGROUP_NO.ReadOnly = true;
        txtGROUP_NO.CssClass = "readtxtbox";
        txtAC_ID.ReadOnly = true;
        txtAC_ID.CssClass = "readtxtbox";
        txtSAL_ID.ReadOnly = true;
        txtSAL_ID.CssClass = "readtxtbox";
        txtZ_O.ReadOnly = true;
        txtZ_O.CssClass = "readtxtbox";

        #region 設定需要驗證的控制項

        this.SLP_STORE_ID.ValidationGroup = "validate_Modify";//店號
        this.SLP_ROOT_NO.ValidationGroup = "validate_Modify";//商品群分類
        this.cuv_TaxType.ValidationGroup = "validate_Modify";//稅別
        this.SLP_DUE_AMT.ValidationGroup = "validate_Modify";//調整金額
        this.txtCLOSE_MONTH.ValidationGroup = "validate_Modify";//結帳年月

        #endregion
    }