//1 public void UploadNewVersionRDK(HttpPostedFileBase[] fileUpload, RKD_Order rKD_Order, string num, int versionDay, string login) { try { int test1 = num.IndexOf('.'); int test2 = num.Length; short num1 = (short)Convert.ToInt32(num.Substring(0, num.IndexOf('.'))); short num2 = (short)Convert.ToInt32(num.Substring(num.IndexOf('.') + 1, num.Length - num.IndexOf('.') - 1)); int id_lastVersion = db.RKD_Version.Where(d => d.id_RKD_Order == rKD_Order.id & d.activeVersion == true).First().id; DeactiveAllVersion(); RKD_Version rKD_Version = new RKD_Version(); rKD_Version.id_RKD_VersionWork = 2; rKD_Version.id_RKD_Order = rKD_Order.id; rKD_Version.numberVersion1 = num1; rKD_Version.numberVersion2 = num2; rKD_Version.id_RKD_VersionDay = db.RKD_VersionDay.Find(versionDay).id; rKD_Version.activeVersion = true; db.RKD_Version.Add(rKD_Version); db.SaveChanges(); CreateFolderSaveFile(fileUpload, 1, login, rKD_Version.id); PushMail(fileUpload, 1); CreateTaskVersion(id_lastVersion, rKD_Version.id, login); UpdateTaskUID(); GetRKDDump(); logger.Debug(goodMethod + " (Modul RKD - UploadNewVersionRDK(HttpPostedFileBase[] fileUpload, RKD_Order rKD_Order, int num1, int num2, int version, string login)"); } catch (Exception ex) { logger.Error(badMethod + " (Modul RKD - UploadNewVersionRDK(HttpPostedFileBase[] fileUpload, RKD_Order rKD_Order, int num1, int num2, int version, string login); " + ex.Message.ToString()); } }
//3 public void UploadVersionRDK(HttpPostedFileBase[] fileUpload, RKD_Order rKD_Order, int num1, int num2, int version, string login) { try { RKD_Version rKD_Version = db.RKD_Version.Where(d => d.activeVersion == true & d.id_RKD_Order == rKD_Order.id).First(); rKD_Version.id_RKD_VersionWork = 2; db.Entry(rKD_Version).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); CreateFolderSaveFile(fileUpload, 2, login, rKD_Version.id); PushMail(fileUpload, 2); logger.Debug(goodMethod + " (Modul RKD - UploadVersionRDK(HttpPostedFileBase[] fileUpload, RKD_Order rKD_Order, int num1, int num2, int version, string login) "); } catch (Exception ex) { logger.Error(badMethod + " (Modul RKD - UploadVersionRDK(HttpPostedFileBase[] fileUpload, RKD_Order rKD_Order, int num1, int num2, int version, string login) " + ex.Message.ToString()); } }
// Create order before create new PZ public void CreateRKDOrder() { try { RKD_Order rKD_Order = new RKD_Order(); rKD_Order.id_PZ_PlanZakaz = id_PZ_PlaznZakaz; rKD_Order.id_RKD_Institute = 1; rKD_Order.datePlanCritical = DateTime.Now.AddDays(34); db.RKD_Order.Add(rKD_Order); db.SaveChanges(); CreateTasks(); CreateNULLVersion(); Create_NULLRKD_TaskVersion(); //UpdateTasksInProject(); GetRKDDump(); logger.Debug(goodConstructor + " (Modul RKD - CreateRKDOrder()"); } catch (Exception ex) { logger.Error(badConstructor + " (Modul RKD - CreateRKDOrder(); " + ex.Message.ToString()); } }
public EmailRKDQuestion(RKD_Order rkdOrder, string recipient) : base(rkdOrder, recipient) { }
public EmailVersion(RKD_Order rkdOrder, string recipient) : base(rkdOrder, recipient) { }
public EmailRKDQustionUpdate(RKD_Order rkdOrder, string recipient, int id_RKD_Question) : base(rkdOrder, recipient) { this.id_RKD_Question = id_RKD_Question; }
public EmailRevisionToKO(RKD_Order rkdOrder, string recipient) : base(rkdOrder, recipient) { }
public EmailRKD(RKD_Order rkdOrder, string recipient) { this.rkdOrder = rkdOrder; Recipient = recipient; }
public EmailSuccessRKD(RKD_Order rkdOrder, string recipient) : base(rkdOrder, recipient) { }
public EmailPutErrorClient(RKD_Order rkdOrder, string recipient, string folder) : base(rkdOrder, recipient) { this.folder = folder; }