提交当前本机整理版本
This commit is contained in:
@@ -474,4 +474,36 @@ namespace Lskj.BaseWorkflow.Control
|
||||
int? maxStepCode = BaseflowModelList
|
||||
.Where(m => m.stepCode < selectedStepCode)
|
||||
.Select(m => m.stepCode)
|
||||
.DefaultIfEmpty
|
||||
.DefaultIfEmpty() // 避免空集合时抛出异常
|
||||
.Max();
|
||||
|
||||
Code = (int)(maxStepCode + (selectedStepCode - maxStepCode) / 2);
|
||||
}
|
||||
BaseflowModel model = new BaseflowModel
|
||||
{
|
||||
stepCode = Convert.ToInt32(Code),
|
||||
typeCode = mMenuCode,
|
||||
stepGroup = stepGroup,
|
||||
stepName = stepName,
|
||||
stepApplyText = "审核(&Y)",
|
||||
stepApplyContent = "同意",
|
||||
stepBackText = "反退(&N)",
|
||||
stepBackContent = "不同意",
|
||||
};
|
||||
try
|
||||
{
|
||||
// 保存
|
||||
if (WorkFlowBaseImpl.SaveBaseFlow(model))
|
||||
{
|
||||
// 重排列表
|
||||
InitializeStepFlow();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageUtil.Show("保存失败!" + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+18
-1
@@ -500,4 +500,21 @@
|
||||
private DevExpress.XtraEditors.PanelControl panelControl4;
|
||||
private System.Windows.Forms.GroupBox groupBox3;
|
||||
private DevExpress.XtraTab.XtraTabControl xtraTabControl2;
|
||||
private DevExpress.XtraTab.XtraTabPage
|
||||
private DevExpress.XtraTab.XtraTabPage xtraTabPage3;
|
||||
public DevExpress.XtraGrid.GridControl gridControl1;
|
||||
private DevExpress.XtraGrid.Views.Grid.GridView gridView2;
|
||||
private DevExpress.XtraGrid.Columns.GridColumn gridColumn3;
|
||||
private DevExpress.XtraGrid.Views.Grid.GridView gridView3;
|
||||
private DevExpress.XtraTab.XtraTabPage xtraTabPage4;
|
||||
public DevExpress.XtraGrid.GridControl gridControl;
|
||||
private DevExpress.XtraGrid.Views.Grid.GridView gridView;
|
||||
private DevExpress.XtraGrid.Columns.GridColumn gridColumn2;
|
||||
private DevExpress.XtraGrid.Columns.GridColumn gridColumn1;
|
||||
private DevExpress.XtraGrid.Views.Grid.GridView gridView1;
|
||||
private DevExpress.XtraEditors.PanelControl panelControl6;
|
||||
private Lskj.Control.LabelTextEdit labelTextEdit1;
|
||||
private Lskj.Control.LabelComboxEdit labelComboxEdit1;
|
||||
private DevExpress.XtraEditors.XtraScrollableControl xtraScrollableControl1;
|
||||
private Lskj.Control.LabelCheckEdit labdisable;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -410,4 +410,35 @@ namespace Lskj.BaseWorkflow.Control
|
||||
}
|
||||
else if (e.SourceGridViewObj.Name == "gridView2")
|
||||
{
|
||||
f
|
||||
foreach (DataRow item in e.GridViewSelectRows)
|
||||
{
|
||||
userNames += "{&" + item["roleName"] + "&},";
|
||||
}
|
||||
|
||||
//userNames = PowerImpl.getAllPersonnel(userNames);
|
||||
//if (userNames.Equals(",")) userNames = "";
|
||||
}
|
||||
|
||||
|
||||
//List<System.String> namesList = new List<System.String>((this.txtEdit.EditValue + "").Split(','));
|
||||
//foreach (string item in userNames.Split(','))
|
||||
//{
|
||||
// if (!namesList.Exists(t => t.Equals(item)))
|
||||
// {
|
||||
// this.txtEdit.EditValue += item + ",";
|
||||
// }
|
||||
|
||||
//}
|
||||
|
||||
|
||||
this.txtEdit.EditValue += userNames;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Instance.WriteError(ex);
|
||||
MessageUtil.Show(ResourceKeys.OperFault);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -865,4 +865,30 @@ namespace Lskj.BaseWorkflow.Control
|
||||
{
|
||||
try
|
||||
{
|
||||
Panel
|
||||
Panel deletePanel = sender as Panel;
|
||||
if (deletePanel != null && deletePanel.Tag != null)
|
||||
{
|
||||
if (MessageUtil.Show("是否删除当前方案步骤?", MessageBoxButtons.YesNo) == DialogResult.Yes)
|
||||
{
|
||||
BaseflowTypeStepModel model = deletePanel.Tag as BaseflowTypeStepModel;
|
||||
if (WorkFlowBaseImpl.DeleteSchemeSteps(model))
|
||||
{
|
||||
MessageUtil.Show("删除成功!");
|
||||
InitializeStepTypeFlow();
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageUtil.Show("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||
MessageUtil.Show(Message, ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -281,4 +281,39 @@ namespace Lskj.BaseWorkflow.Control
|
||||
DataTable dataTable = WorkFlowBaseImpl.getFinalBack(mMenuCode);
|
||||
if (dataTable.Rows.Count > 0) {
|
||||
this.memoEdit1.Text = dataTable.Rows[0]["OverBackSql"]+"";
|
||||
this.memo
|
||||
this.memoEdit2.Text = dataTable.Rows[0]["OverBackOper"] + "";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 生成终审sql
|
||||
/// </summary>
|
||||
public void GenerateFinalSqlStatement()
|
||||
{
|
||||
bool result = WorkFlowBaseImpl.CreateSQL();
|
||||
//DataTable table = WorkFlowBaseImpl.GetBaseFlowData(mMenuCode);
|
||||
if (result)
|
||||
{
|
||||
//单据,单表用的同一个存储过程
|
||||
string sql = "";
|
||||
//string stepcode = table.Rows[0]["stepcode"] + "";
|
||||
int resultNew = WorkFlowBaseImpl.GenerateFinalSqlStatement(mMenuCode,"0", out sql);
|
||||
if (resultNew == 1)
|
||||
{
|
||||
this.memoEdit1.Text = sql;
|
||||
this.UpdateFinalReturnSettings();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageUtil.Show("p_systemCreateendFlowSQL存储过程错!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user