本文整理汇总了C#中ActionService.UpdateData方法的典型用法代码示例。如果您正苦于以下问题:C# ActionService.UpdateData方法的具体用法?C# ActionService.UpdateData怎么用?C# ActionService.UpdateData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ActionService
的用法示例。
在下文中一共展示了ActionService.UpdateData方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ExportStopWorkingByTemplate
//.........这里部分代码省略.........
string status = string.Empty;
var contractServices = new Hre_WorkHistoryServices();
var actionService = new ActionService(UserLogin);
var objs = new List<object>();
string strIDs = string.Empty;
foreach (var item in selectedIds)
{
strIDs += Common.DotNetToOracle(item.ToString()) + ",";
}
if (strIDs.IndexOf(",") > 0)
strIDs = strIDs.Substring(0, strIDs.Length - 1);
objs.Add(strIDs);
var lstStopWorking = actionService.GetData<Hre_StopWorkingEntity>(objs, ConstantSql.hrm_hr_sp_get_StopWorkingByListId, ref status);
if (lstStopWorking == null)
return null;
int i = 0;
String suffix = DateStart.ToString("_ddMMyyyyHHmmss");
string folferPath = string.Empty;
string folderName = "ExportHre_StopWorking" + suffix;
if (lstStopWorking.Count > 1)
{
folferPath = dirpath + "/" + folderName;
Directory.CreateDirectory(folferPath);
}
else
{
folferPath = dirpath;
}
var fileDoc = string.Empty;
foreach (var stopWorking in lstStopWorking)
{
if (stopWorking.DateStop.HasValue)
{
stopWorking.DateStopFormat = stopWorking.DateStop.Value.ToString("dd/MM/yyyy");
}
if (stopWorking.DateQuit.HasValue)
stopWorking.DateQuitFormat = stopWorking.DateQuit.Value.ToString("dd/MM/yyyy");
if (stopWorking.RequestDate.HasValue)
stopWorking.RequestDateFormat = stopWorking.RequestDate.Value.ToString("dd/MM/yyyy");
stopWorking.RequestDate_Day = stopWorking.RequestDate.Value.Day.ToString();
stopWorking.RequestDate_Month = stopWorking.RequestDate.Value.Month.ToString();
stopWorking.RequestDate_Year = stopWorking.RequestDate.Value.Year.ToString();
ActionService service = new ActionService(UserLogin);
var exportService = new Cat_ExportServices();
Cat_ExportEntity template = null;
string outputPath = string.Empty;
List<object> lstObjExport = new List<object>();
lstObjExport.Add(null);
lstObjExport.Add(null);
lstObjExport.Add(null);
lstObjExport.Add(null);
lstObjExport.Add(1);
lstObjExport.Add(10000000);
if (!string.IsNullOrEmpty(valueFields))
{
template = actionService.GetData<Cat_ExportEntity>(Common.DotNetToOracle(valueFields), ConstantSql.hrm_cat_sp_get_ExportById, ref status).FirstOrDefault();
}
if (template == null)
{
messages = "Error";
return Json(messages, JsonRequestBehavior.AllowGet);
}
string templatepath = Common.GetPath(Common.TemplateURL + template.TemplateFile);
if (!System.IO.File.Exists(templatepath))
{
messages = "NotTemplate";
return Json(messages, JsonRequestBehavior.AllowGet);
}
outputPath = folferPath + "/" + Common.ChuyenTVKhongDau(stopWorking.ProfileName) + suffix + i.ToString() + "_" + template.TemplateFile;
fileDoc = NotificationType.Success.ToString() + "," + Common.DownloadURL + "/" + Common.ChuyenTVKhongDau(stopWorking.ProfileName) + suffix + i.ToString() + "_" + template.TemplateFile;
if (!System.IO.File.Exists(templatepath))
{
messages = "NotTemplate";
return Json(messages, JsonRequestBehavior.AllowGet);
}
var lststopworking = new List<Hre_StopWorkingEntity>();
lststopworking.Add(stopWorking);
ExportService.ExportWord(outputPath, templatepath, lststopworking);
}
List<object> lstNo = new List<object>();
lstNo.Add(strIDs);
if (lstStopWorking.Count > 1)
{
var fileZip = Common.MultiExport("", true, folderName);
var updateNoPrint1 = actionService.UpdateData<Hre_StopWorkingEntity>(lstNo, ConstantSql.hrm_hr_sp_set_UpdateNoPrint, ref status);
return Json(fileZip);
}
var updateNoPrint2 = actionService.UpdateData<Hre_StopWorkingEntity>(lstNo, ConstantSql.hrm_hr_sp_set_UpdateNoPrint, ref status);
return Json(fileDoc);
}