public IHttpActionResult SuspendedMailConQua(string ContractorID, string Reason)
        {
            {
                var entity = Db.ContractorQualifications.First(x => x.ContractorID == ContractorID);
                if (entity.Status == "C" || entity.Status == "SC")
                {
                    gate.ExecuteStoredProcedureNonQuery("C_@Daily_ConQuaNoticeSuspended",
                                                        new string[] { "ContractorID", "FromUser", "Kinds", "FormKey", "Mailkind", "Reason" }
                                                        , new object[] { ContractorID, null, null, null, "c_suspended", Reason });
                }
                else if (entity.Status == "PC")
                {
                    gate.ExecuteStoredProcedureNonQuery("C_@Daily_ConQuaNoticeSuspended",
                                                        new string[] { "ContractorID", "FromUser", "Kinds", "FormKey", "Mailkind", "Reason" }
                                                        , new object[] { ContractorID, null, null, null, "c_suspendedTemporary", Reason });
                }
                else
                {
                    gate.ExecuteStoredProcedureNonQuery("C_@Daily_ConQuaNoticeSuspended",
                                                        new string[] { "ContractorID", "FromUser", "Kinds", "FormKey", "Mailkind", "Reason" }
                                                        , new object[] { ContractorID, null, null, null, "c_Cancelsuspended", null });
                }


                Db.SaveChanges();
                return(Ok());
            }
        }
        public IHttpActionResult ConfirmdMail(string ContractorID)
        {
            var entity = Db.Contractors.First(x => x.ContractorID == ContractorID);

            if (entity.Status == "S")
            {
                oAC.ExecuteStoredProcedureNonQuery("C_@Daily_SendNoticeExpired"
                                                   , new string[] { "ContractorID", "FromUser", "Kinds", "FormKey", "Mailkind" }
                                                   , new object[] { ContractorID, null, null, null, "c_Appointment" });
            }

            Db.SaveChanges();
            return(Ok());
        }
        public IHttpActionResult SuspendedMailContractor(string EmployeeID, string mailKind)
        {
            try
            {
                oAC.ExecuteStoredProcedureNonQuery("C_@Daily_ContractorNoticeSuspended"
                                                   , new string[] { "EmployeeID", "Mailkind" }
                                                   , new object[] { EmployeeID, mailKind });

                return(Ok());
            }
            catch (Exception e)
            {
                Loger.Error(e);
                return(BadRequest(e.Message + e.StackTrace));
            }
        }
示例#4
0
 public IHttpActionResult EG_SendMail(string flowname, string VoucherID, string FromUser, string MailKind)
 {
     try
     {
         gate.ExecuteStoredProcedureNonQuery("EG_@SendMailSubmit"
                                             , new string[] { "flowname", "VoucherID", "FromUser", "MailKind" }
                                             , new object[] { flowname, VoucherID, FromUser, MailKind });
         return(Ok());
     }
     catch (Exception e)
     {
         Loger.Error(e);
         return(BadRequest(e.Message + e.StackTrace));
     }
 }