private bool Save() { if (!CheckInputvalidity()) { return(false); } try { //判断当前是否为编辑状态,如果是编辑状态则需要删除原有任务 //但任务的ID不能变化 Int64 Nid = SaveTaskPlan(); this.txtPlanID.Text = Nid.ToString(); this.IsSave.Text = "false"; this.IsSaveTask = true; if (this.FormState == cGlobalParas.FormState.New) { this.FormState = cGlobalParas.FormState.Edit; } } catch (System.Exception ex) { MessageBox.Show(rm.GetString("Info89") + ex.Message, rm.GetString("MessageboxInfo"), MessageBoxButtons.OK, MessageBoxIcon.Error); return(false); } return(true); }
private bool Save() { if (!CheckInputvalidity()) { return false ; } try { //�жϵ�ǰ�Ƿ�Ϊ�༭״̬������DZ༭״̬����Ҫɾ��ԭ������ //�������ID���ܱ仯 Int64 Nid = SaveTaskPlan(); this.txtPlanID.Text = Nid.ToString(); this.IsSave.Text = "false"; this.IsSaveTask = true; if (this.FormState == cGlobalParas.FormState.New) { this.FormState = cGlobalParas.FormState.Edit; } } catch (System.Exception ex) { MessageBox.Show(rm.GetString("Info89") + ex.Message, rm.GetString("MessageboxInfo"), MessageBoxButtons.OK, MessageBoxIcon.Error); return false ; } return true; }