提交当前本机整理版本
This commit is contained in:
@@ -590,4 +590,41 @@ namespace Lskj.Workflow.Control
|
||||
int? maxStepCode = BillflowModelList
|
||||
.Where(m => m.stepCode < selectedStepCode)
|
||||
.Select(m => m.stepCode)
|
||||
.DefaultIfEmpty() // 避免空集合时抛出��
|
||||
.DefaultIfEmpty() // 避免空集合时抛出异常
|
||||
.Max();
|
||||
|
||||
Code = (int)(maxStepCode + (selectedStepCode - maxStepCode) / 2);
|
||||
}
|
||||
|
||||
|
||||
BillflowModel model = new BillflowModel
|
||||
{
|
||||
stepCode = Convert.ToInt32(Code),
|
||||
typeCode = mMenuCode,
|
||||
stepGroup = stepGroup,
|
||||
stepName = stepName,
|
||||
stepApplyText = "审核(&Y)",
|
||||
stepApplyContent = "同意",
|
||||
stepBackText = "反退(&N)",
|
||||
stepBackContent = "不同意"
|
||||
};
|
||||
|
||||
try
|
||||
{
|
||||
// 保存
|
||||
if (WorkFlowBillImpl.SaveBillFlow(model))
|
||||
{
|
||||
// 重排列表
|
||||
InitializeStepFlow();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw;
|
||||
//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.X
|
||||
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.PanelControl panelControl2;
|
||||
private Lskj.Control.LabelCheckEdit labdisable;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -459,4 +459,32 @@ namespace Lskj.Workflow.Control
|
||||
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)
|
||||
{
|
||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||
MessageUtil.Show(Message,ex.Message);
|
||||
LogHelper.Instance.WriteError(ex);
|
||||
//MessageUtil.Show(ResourceKeys.OperFault);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -946,4 +946,31 @@ namespace Lskj.Workflow.Control
|
||||
{
|
||||
try
|
||||
{
|
||||
Panel de
|
||||
Panel deletePanel = sender as Panel;
|
||||
if (deletePanel != null && deletePanel.Tag != null)
|
||||
{
|
||||
if (MessageUtil.Show("是否删除当前方案步骤?", MessageBoxButtons.YesNo) == DialogResult.Yes)
|
||||
{
|
||||
|
||||
BillflowTypeStepModel model = deletePanel.Tag as BillflowTypeStepModel;
|
||||
if (WorkFlowBillImpl.DeleteSchemeSteps(model))
|
||||
{
|
||||
MessageUtil.Show("删除成功!");
|
||||
InitializeStepTypeFlow();
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageUtil.Show("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||
MessageUtil.Show(Message, ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -242,4 +242,37 @@ namespace Lskj.Workflow.Control
|
||||
if (dataTable.Rows.Count > 0)
|
||||
{
|
||||
this.memoEdit1.Text = dataTable.Rows[0]["OverBackSql"] + "";
|
||||
|
||||
this.memoEdit2.Text = dataTable.Rows[0]["OverBackOper"] + "";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 生成终审sql
|
||||
/// </summary>
|
||||
public void GenerateFinalSqlStatement()
|
||||
{
|
||||
bool result = WorkFlowBaseImpl.CreateSQL();
|
||||
//DataTable table = WorkFlowBillImpl.GetBillFlowData(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存储过程错!");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -512,4 +512,42 @@ namespace Lskj.Workflow
|
||||
fristparagraph.ApplyStyle(BuiltinStyle.Subtitle);
|
||||
document.SaveToFile(filePath, FileFormat.Docx);
|
||||
//Launching the MS Word file.
|
||||
|
||||
WordDocViewer(filePath);
|
||||
}
|
||||
public static void WordDocViewer(string fileName)
|
||||
{
|
||||
try
|
||||
{
|
||||
System.Diagnostics.Process.Start(fileName);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 点击开始生成
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btn_start_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Initialization(); // 初始化同步平台
|
||||
// 创建后台线程
|
||||
try
|
||||
{
|
||||
Thread backThread = new Thread(Mulu);
|
||||
backThread.IsBackground = true;
|
||||
backThread.Start();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
private void btn_getout_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+21
-1
@@ -389,4 +389,24 @@
|
||||
private DevExpress.XtraEditors.PanelControl panelControl3;
|
||||
private Control.StepPage1 stepPage11;
|
||||
private System.Windows.Forms.Panel pllzbzsz;
|
||||
private System.Windows.Forms.Lab
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Panel plxllzsz;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Panel plxlsz;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private DevExpress.XtraEditors.SimpleButton btnSave;
|
||||
private DevExpress.XtraEditors.SimpleButton btnAdd;
|
||||
private DevExpress.XtraEditors.SimpleButton btnReset;
|
||||
private DevExpress.XtraEditors.SimpleButton btnInit;
|
||||
private DevExpress.XtraEditors.SimpleButton btnSaveAllflow;
|
||||
private DevExpress.XtraEditors.SimpleButton btnToWord;
|
||||
private System.Windows.Forms.Panel panel2;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.Panel plzsht;
|
||||
private Control.StepPage4 stepPage41;
|
||||
private Control.StepPage2 stepPage21;
|
||||
private Control.StepPage3 stepPage31;
|
||||
private DevExpress.XtraEditors.SimpleButton btnInsert;
|
||||
}
|
||||
}
|
||||
@@ -475,4 +475,32 @@ namespace Lskj.Workflow
|
||||
private void btnInsert_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
|
||||
{
|
||||
switch (mCurrentStepPage)
|
||||
{
|
||||
case StepEnum.StepPage1:
|
||||
{
|
||||
// 保存流转步骤
|
||||
FrmAddStep frmAddStep = new FrmAddStep();
|
||||
frmAddStep.LabelObj.Text = "请输入审批步骤:";
|
||||
|
||||
if (frmAddStep.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
string stepName = frmAddStep.StepName;
|
||||
string stepGroup = frmAddStep.StepName;
|
||||
|
||||
this.stepPage11.InsertFlowItem(stepGroup, stepGroup);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||
MessageUtil.Show(Message, ex.Message);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
DevExpress.XtraEditors.ComboBoxEdit, DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
Reference in New Issue
Block a user