Exemplo n.º 1
0
        void view_OnAdd(object sender, Views.CheckScriptArgs e)
        {
            DataTable data = Model.GetScriptByNO(e.NO);

            if (data != null && data.Rows.Count > 0)
            {
                View.ShowMessage("存在相同的编号!");
                View.ExeFocusNO();
            }
            else
            {
                if (Message.ShowQuery("确定添加?", Message.Button.OkCancel) == Message.Result.Ok)
                {
                    bool bol = Model.AddCheckScript(e.NO, e.Test, e.Error, e.CheckID, e.Level, e.Classify, User.UserID);
                    View.ExeIsSuccessAdd(bol);
                }
            }
        }
Exemplo n.º 2
0
 void view_OnModify(object sender, Views.CheckScriptArgs e)
 {
     if (e.OldNO != e.NO)
     {
         DataTable data = Model.GetScriptByNO(e.NO);
         if (data != null && data.Rows.Count > 0)
         {
             View.ShowMessage("存在相同的编号!");
             View.ExeFocusNO();
             return;
         }
     }
     if (Message.ShowQuery("确定保存?", Message.Button.OkCancel) == Message.Result.Ok)
     {
         bool bol = Model.ModifyCheckScript(e.NO, e.Test, e.Error, e.CheckID, e.Level, e.Classify, e.Status, User.UserID, e.ID);
         View.ExeIsSuccessModify(bol);
     }
 }
Exemplo n.º 3
0
        void view_OnDelete(object sender, Views.CheckScriptArgs e)
        {
            bool bol = Model.DeleteCheckScript(e.ID, User.UserID);

            View.ExeIsSuccessDelete(bol);
        }
Exemplo n.º 4
0
        void view_OnSearch(object sender, Views.CheckScriptArgs e)
        {
            DataTable data = Model.GetScriptByKey(e.Key);

            View.ExeBindData(data);
        }