Exemple #1
0
        protected void ASPxTreeList1_NodeUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e)
        {
            string rmes_id = e.Keys["RMES_ID"] as string;

            DetectBarCodeEntity entity = new DetectBarCodeEntity()
            {
                RMES_ID = rmes_id
            };

            entity.SEQ_VALUE  = e.NewValues["SEQ_VALUE"] as string;
            entity.SEQ_NAME   = e.NewValues["SEQ_NAME"] as string;
            entity.SEQ_FATHER = e.NewValues["SEQ_FATHER"] as string;
            entity.PLINE_CODE = e.NewValues["PLINE_CODE"] as string;
            if (string.IsNullOrEmpty(entity.SEQ_FATHER) || entity.SEQ_FATHER == "f001")
            {
                entity.SEQ_LEVEL = "1";
            }
            else
            {
                entity.SEQ_LEVEL = "2";
            }
            db.Update(entity);
            e.Cancel = true;
            ASPxTreeList1.CancelEdit();
            BindData();
        }
Exemple #2
0
    void ASPxTreeList1_NodeInserting(object sender, DevExpress.Web.Data.ASPxDataInsertingEventArgs e)
    {
        string result = this.parseMenuData(false,
                                           operate.AddNew,
                                           theCompanyCode,
                                           O2S(e.NewValues["MENU_CODE"]),
                                           O2S(e.NewValues["MENU_NAME"]),
                                           O2S(e.NewValues["MENU_NAME_EN"]),
                                           O2S(e.NewValues["MENU_CODE_FATHER"]),
                                           O2S(e.NewValues["MENU_LEVEL"]),
                                           O2S(e.NewValues["MENU_INDEX"]),
                                           O2S(e.NewValues["LEAF_FLAG"]),
                                           O2S(e.NewValues["PROGRAM_CODE"])
                                           );

        if (result.Length > 0)
        {
            e.Cancel = false;
        }
        else
        {
            ASPxTreeList1.CancelEdit();
            e.Cancel = true;
            bindData();
        }
    }
Exemple #3
0
    //void ASPxTreeList1_NodeValidating(object sender, DevExpress.Web.ASPxTreeList.TreeListNodeValidationEventArgs e)
    //{
    //    string result = this.parseMenuData(true,
    //        e.IsNewNode ? operate.AddNew : operate.Update,
    //        theCompanyCode,
    //        O2S(e.NewValues["MENU_CODE"]),
    //        O2S(e.NewValues["MENU_NAME"]),
    //        O2S(e.NewValues["MENU_NAME_EN"]),
    //        O2S(e.NewValues["MENU_CODE_FATHER"]),
    //        O2S(e.NewValues["MENU_LEVEL"]),
    //        O2S(e.NewValues["MENU_INDEX"]),
    //        O2S(e.NewValues["LEAF_FLAG"]),
    //        O2S(e.NewValues["PROGRAM_CODE"])
    //        );
    //    if (result.Length > 0) e.NodeError = result;
    //}

    //void ASPxTreeList1_NodeDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
    //{

    //    string result = this.parseMenuData(false,
    //      operate.Delete,
    //      theCompanyCode,
    //      O2S(e.Values["MENU_CODE"]),
    //      O2S(e.Values["MENU_NAME"]),
    //      O2S(e.Values["MENU_NAME_EN"]),
    //      O2S(e.Values["MENU_CODE_FATHER"]),
    //      O2S(e.Values["MENU_LEVEL"]),
    //      O2S(e.Values["MENU_INDEX"]),
    //      O2S(e.Values["LEAF_FLAG"]),
    //      O2S(e.Values["PROGRAM_CODE"])
    //      );
    //    if (result.Length > 0)
    //    {
    //        e.Cancel = false;
    //    }
    //    else
    //    {
    //        ASPxTreeList1.CancelEdit();
    //        e.Cancel = true;
    //        bindData();
    //    }
    //}

    void ASPxTreeList1_NodeUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e)
    {
        string project = e.OldValues["项目代号"].ToString();
        string batch   = e.OldValues["批次"].ToString();
        string plan    = e.OldValues["工作号"].ToString();
        int    num     = int.Parse(e.OldValues["工艺序号"].ToString());
        //string oldTeam = e.OldValues["TEAM_CODE"].ToString();
        string team = e.NewValues["TEAM_CODE"].ToString();

        string sql = "";

        if (e.OldValues["TEAM_CODE"] == null)
        {
            sql = "INSERT INTO REL_PROCESS_TEAM(RMES_ID, PROJECT_CODE, BATCH_WORK_CODE, PLAN_CODE, PROCESS_NUM, TEAM_CODE)"
                  + " VALUES(SEQ_RMES_ID.NEXTVAL,'" + project + "','" + batch + "','" + plan + "'," + num + ",'" + team + "')";
        }
        else
        {
            sql = "UPDATE REL_PROCESS_TEAM SET TEAM_CODE ='" + team + "' WHERE PROCESS_NUM = " + num;
        }

        dataConn dc = new dataConn();

        dc.ExeSql(sql);

        ASPxTreeList1.CancelEdit();
        e.Cancel = true;
        bindData();

        //string result = this.parseMenuData(false,
        //  operate.Update,
        //  theCompanyCode,
        //  O2S(e.OldValues["MENU_CODE"]),
        //  O2S(e.NewValues["MENU_NAME"]),
        //  O2S(e.NewValues["MENU_NAME_EN"]),
        //  O2S(e.NewValues["MENU_CODE_FATHER"]),
        //  O2S(e.NewValues["MENU_LEVEL"]),
        //  O2S(e.NewValues["MENU_INDEX"]),
        //  O2S(e.NewValues["LEAF_FLAG"]),
        //  O2S(e.NewValues["PROGRAM_CODE"])
        //  );
        //if (result.Length > 0)
        //{
        //    e.Cancel = false;
        //}
        //else
        //{
        //    ASPxTreeList1.CancelEdit();
        //    e.Cancel = true;
        //    bindData();
        //}
    }
Exemple #4
0
        protected void ASPxTreeList1_NodeDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
        {
            string rmes_id             = e.Values["RMES_ID"] as string;
            DetectBarCodeEntity entity = new DetectBarCodeEntity()
            {
                RMES_ID = rmes_id
            };

            db.Delete(entity);
            e.Cancel = true;
            ASPxTreeList1.CancelEdit();
            BindData();
        }
 protected void ASPxTreeList1_NodeUpdating(object sender, ASPxDataUpdatingEventArgs e)
 {
     XmlHelper.UpdateNode(sender as ASPxTreeList, e);
     ASPxTreeList1.CancelEdit();
     e.Cancel = true;
 }