You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.6 KiB

using RS.BLL;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace MorClient.UserFrmFrame
{
public partial class FrmFormulaSaveAs : Form
{
BRecipeWoekManage bRecipeWoekManage = new BRecipeWoekManage();
public static bool ifDetermine = false;
//public static string scr = null;
public FrmFormulaSaveAs()
{
InitializeComponent();
//scr = null;
}
private void pictureBox1_Click(object sender, EventArgs e)
{
this.Close();
}
private void uiButton2_Click(object sender, EventArgs e)
{
ifDetermine = false;
this.Close();
}
private void uiButton1_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(richTextBox1.Text))
{
bool result = bRecipeWoekManage.SelRecipeNameInfo((richTextBox1.Text).Replace(" ", ""), FormulaUnit.nowMachineName);
if (!result)
{
ifDetermine = true;
this.Close();
}
else
{
MessageBox.Show("当前配方名称已经存在");
}
}
else
{
MessageBox.Show("配方名称不可为空!");
}
}
public string SaveAsRecipeName()
{
return richTextBox1.Text;
}
}
}