Ejemplo n.º 1
0
    /// <summary>
    /// ��Grid
    /// </summary>
    protected void BindGrid(string workflowNo)
    {
        WFunctionBB functionBB = new WFunctionBB();
        DataSet ds = new DataSet();

        try
        {
            ds = functionBB.GetVList("workflowNo='" + workflowNo + "'");

            // ��������
            StringBuilder sBuilder = new StringBuilder();
            sBuilder.Append("����|@functionNo|@|@left");
            sBuilder.Append("|!�����|@functionNm|@|@left");
            sBuilder.Append("|!ִ���ļ�Ŀ¼|@functionUrl|@|@left");
            sBuilder.Append("|!���ڸ߶�|@windowHeight|@|@left");
            sBuilder.Append("|!���ڿ��|@windowWidth|@|@left");

            //��������
            this.dataGrid.TitleDescription = sBuilder.ToString();
            this.dataGrid.DataSource = ds.Tables[0];
        }
        finally
        {
            functionBB.Dispose();
        }
    }
Ejemplo n.º 2
0
 private void ShowInfo(string id)
 {
     WFunctionBB functionBB = new WFunctionBB();
     vWFunctionData model = new vWFunctionData();
     try
     {
         model = functionBB.GetVModel(id);
         this.functionNo.Text = model.functionNo;
         this.functionNm.Text = model.functionNm;
         //this.functionUrl.Text = model.functionUrl;
         //this.functionChangeUrl.Text = model.functionChangeUrl;
         this.useEmpField.Text = model.useEmpField;
         this.auditEmpIdField.Text = model.auditEmpIdField;
         this.auditDtField.Text = model.auditDtField;
         this.workFlowStateField.Text = model.workFlowStateField;
         this.workFlowSeqField.Text = model.workFlowSeqField;
         this.auditMarkField.Text = model.auditMarkField;
         this.auditDegreeField.Text = model.auditDegreeField;
         this.windowHeight.Text = model.windowHeight.ToString();
         this.windowWidth.Text = model.windowWidth.ToString();
         this.isAutoAudit.Text = model.isAutoAudit.ToString();
         this.remark.Text = model.remark;
     }
     finally
     {
         functionBB.Dispose();
     }
 }
Ejemplo n.º 3
0
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        WFunctionData model = new WFunctionData();
        WFunctionBB functionBB = new WFunctionBB();
        try
        {
            if (this.State == "1")
            {
                this.SetModel(ref model);
                functionBB.AddRecord(model);
            }
            else if (this.State == "2")
            {
                model = functionBB.GetModel(this.IdValue);
                this.SetModel(ref model);
                functionBB.ModifyRecord(model);
            }
        }
        catch (Exception ex)
        {
            this.ClientScript.RegisterStartupScript(this.GetType(), "ShowErr", "ShowErr(\"" + Server.UrlEncode(ex.Message) + "\",4);", true);
            return;
        }
        finally
        {
            functionBB.Dispose();
        }

        this.ClientScript.RegisterStartupScript(this.GetType(), "CloseSubmit", "CloseSubmit()", true);
    }
Ejemplo n.º 4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         if (Request.Params["id"] != null && Request.Params["id"].Trim() != "")
         {
             this.IdValue = Request.Params["id"];
         }
         if (Request.Params["state"] != null && Request.Params["state"].Trim() != string.Empty)
         {
             this.State = Request.Params["state"].ToString();
             switch (this.State)
             {
                 case "1":   //add
                     break;
                 case "2":   //update
                     //���ؿؼ�
                     WFunctionBB functionBB = new WFunctionBB();
                     WFunctionData functionData = new WFunctionData();
                     try
                     {
                         functionData = functionBB.GetModel(this.IdValue);
                         //����й��������˴�Ҫ��֤�Ƿ������޸�
                         this.ShowInfo(this.IdValue);
                     }
                     finally
                     {
                         functionBB.Dispose();
                     }
                     break;
                 default:
                     break;
             }
         }
     }
 }