Exemple #1
0
        public ResultMsg MultiDefectRepair2([FromBody] Qccastt qccastt)
        {
            LogManager.SetCommonLog("Method Call");
            List <Qccastt> q = new List <Qccastt>();

            q.Add(qccastt);
            return(QccasttUtility.QCCASTT_MultiDefectRepair(q));
        }
Exemple #2
0
        public ActionResult GetJCarDef(string _Vin)
        {
            Qccastt q = new Qccastt();

            q.Vin = _Vin;
            List <QccasttLight> lstQccasttLight = QccasttUtility.GetCarDefectLight(_Vin);

            //SelectList list = CommonUtility.ToSelectList(QccasttUtility.GetCarDefect(q,).Tables[0], "Bdstlcode", "AliasName", false);
            return(Json(lstQccasttLight, JsonRequestBehavior.AllowGet));
        }
Exemple #3
0
        public List <Qccastt> tstCarDefect()
        {
            Qccastt q = new Qccastt();

            //q.Vin = "NAS411100G1205277";
            q.deletedby  = -1;
            q.DateType   = "M";
            q.ActAreaSrl = 94;
            q.ActBy      = 4314;
            return(QccasttUtility.GetCarDefect(q));
        }
Exemple #4
0
        public ActionResult FromLoadFileReport()
        {
            var       formValues = StiMvcViewer.GetFormValues(this.HttpContext);
            CarModels cm         = new CarModels();

            if (formValues.Count != 0)
            {
                cm.Vin = formValues.GetValues("vin").GetValue(0).ToString();
            }
            else
            {
                cm.Vin = "NAS0";
            }
            try
            {
                Qccastt qccastt = new Qccastt();
                qccastt.Vin = cm.GetVin();
                DataSet dsCardInfo = new DataSet();
                if (!string.IsNullOrEmpty(cm.Vin))
                {
                    Object[] obj = null;
                    dsCardInfo = QccasttUtility.GetCarDefect(qccastt, out obj);
                    dsCardInfo.Tables[0].TableName = "CarDefects";
                }

                StiReport report = new StiReport();
                report.Load(Server.MapPath("/Content/ReportsFile/QCCard2.mrt"));
                StiText stitxtVin = (StiText)report.GetComponentByName("txtVin");
                stitxtVin.Text = cm.GetVin();
                // BCVin
                StiBarCode stiBCVin = (StiBarCode)report.GetComponentByName("BCVin");
                stiBCVin.Code = new StiBarCodeExpression(cm.GetVin());

                //report.RegBusinessObject("driverReport", dsCardInfo.Tables[0]);
                //int i = dsCardInfo.Tables[0].Rows.Count;
                //report.Compile();

                report.RegData(dsCardInfo);
                return(StiMvcViewer.GetReportSnapshotResult(HttpContext, report));
            }
            catch (Exception ex)
            {
                // lblVinMessage.Text = "خطا در دریافت اطلاعات";
                return(View());
            }
        }
Exemple #5
0
 public static Car GetCarInfo(Car car)
 {
     try
     {
         if ((car != null)) // && (U.Macaddress == "48:13:7e:11:d7:1f"))
         {
             //Value cannot be null.
             car.ValidFormat    = CheckFormatVin(car.Vin);
             car.VinWithoutChar = GetVinWithoutChar(car.Vin);
             if (car.ValidFormat)
             {
                 List <Car> carinfo     = new List <Car>();
                 string     commandtext = string.Format(@"select c.vin,c.engineno,c.prodno,c.joinerydate,c.bdmdlcode,c.bdstlcode,c.bdstlaliasname ,c.fitypecode,c.finqccode,c.clrcode, (select q.toareasrl from qcqctrt q where vin =c.vin and passed=0) as CurAreaSrl,
                                                     c.JoinaryTeamDesc,c.nasvin,c.shopcode,c.shopname,c.joinaryteam,c.assmteamwork,c.assemblytypecode,c.gearboxtypecode,c.forexport,c.grpcode,c.bdmdlaliasname,
                                                     c.grpname,c.comanyname as companyname,c.companycode,c.fitypename,c.clralias,c.gearboxtypedesc,c.prodenddate,substr(c.prodenddate_fa,0,16) as prodenddate_fa,substr(c.joinerydate_fa,0,16) as joinerydate_fa,substr(c.bodyshopproddate,0,16)as bodyshopproddate,substr(c.paintshopproddate,0,16) as paintshopproddate,substr(asmshopproddate,0,16) as asmshopproddate,
                                                     (select distinct (s.shopcode) from pt.cartrace ct join pt.station s on ct.stncode = s.stncode where ct.vin = c.vin and ct.passed=0) as PTCurrentShopCode,
                                                     {1} as ActAreaSrl,{2} as ActBy,
                                                     (select count(srl) from qccastt t where t.qcareat_srl ={1} and t.vin = c.vin and t.isdefected=1 and t.inuse=1 and t.deletedby is null and t.recordowner=1 ) CurrentAreaDefCount,
                                                     TO_char(p.createddate,'YYYY/MM/DD HH24:MI:SS','nls_calendar=persian') as ProCreatedDateFa,
                                                     u.fname ||' '|| u.lname as ProCreatedByDesc,decode(p.LocIsValid,null,-1,p.LocIsValid) as LocIsValid
                                                     from qccariddt c left join qcprot p on c.vin = p.vin left join qcusert u on p.createdby = u.srl
                                                     where c.vin ='{0}' "
                                                        , car.VinWithoutChar, car.ActAreaSrl, car.ActBy);
                 //
                 carinfo = DBHelper.GetDBObjectByObj2_OnLive(new Car(), null, commandtext, "inspector").Cast <Car>().ToList();
                 if (carinfo.Count == 1)
                 {
                     carinfo[0].ValidFormat    = car.ValidFormat;
                     carinfo[0].Vin            = car.Vin;
                     carinfo[0].VinWithoutChar = car.VinWithoutChar;
                     Qccastt q = new Qccastt();
                     q.Vin                         = car.Vin;
                     q.ActAreaSrl                  = car.ActAreaSrl;
                     q.ActBy                       = car.ActBy;
                     q.VinWithoutChar              = car.VinWithoutChar;
                     carinfo[0].lstQcqctrt         = QccasttUtility.GetCarTrace(q);
                     carinfo[0].lstQccastt         = QccasttUtility.GetCarDefect(q);
                     carinfo[0].LastStopTime       = QccasttUtility.GetLastStopTime(car.VinWithoutChar);
                     carinfo[0].CurAreaDefectCount = QccasttUtility.GettCurrentAreaDefectCoun(car.VinWithoutChar, car.ActAreaSrl.ToString());
                     //---
                     return(carinfo[0]);
                 }
                 else
                 {
                     car.msg = "car not found" + commandtext;
                     return(car);
                 }
             }
             else
             {
                 car.msg = "vin is not valid format";
                 return(car);
             }
         }
         else
         {
             car.msg = "Car Is Null";
             return(car);
         }
     }
     catch (Exception ex)
     {
         car.msg = ex.Message.ToString();
         //string message = string.Format("Time: {0}", DateTime.Now.ToString("dd/MM/yyyy hh:mm:ss tt"));
         //message += Environment.NewLine;
         //message += "-----------------------------------------------------------";
         //message += Environment.NewLine;
         //message += string.Format("Message: {0}", ex.Message);
         //message += Environment.NewLine;
         //message += string.Format("StackTrace: {0}", ex.StackTrace);
         //message += Environment.NewLine;
         //message += string.Format("Source: {0}", ex.Source);
         //message += Environment.NewLine;
         //message += string.Format("TargetSite: {0}", ex.TargetSite.ToString());
         //message += Environment.NewLine;
         //message += "-----------------------------------------------------------";
         //message += Environment.NewLine;
         //string path = @"C:/ErrorLog/ErrorLog.txt";
         //StreamWriter writer = new StreamWriter(path, true);
         //writer.WriteLine(message);
         //writer.Close();
         return(car);
     }
 }
Exemple #6
0
 public List <Summary> UserSammary([FromBody] Qccastt qccastt)
 {
     return(QccasttUtility.GetUserSammary(qccastt.ActAreaSrl, qccastt.ActAreaSrl, 0, qccastt.RepairedByDesc));
 }
Exemple #7
0
 public ResultMsg DefectDetect([FromBody] Qccastt qccastt)
 {
     return(QccasttUtility.QCCASTT_DefectDetect(qccastt));
 }
Exemple #8
0
 public ResultMsg DeleteQccastt([FromBody] Qccastt qccastt)
 {
     return(QccasttUtility.Delete_QCCASTT(qccastt));
 }
Exemple #9
0
 public List <Qccastt> CarDefect([FromBody] Qccastt qccastt)
 {
     return(QccasttUtility.GetCarDefect(qccastt));
 }
Exemple #10
0
 public ResultMsg PDIConfirm([FromBody] Qccastt qccastt)
 {
     return(QccasttUtility.PDIConfirm(qccastt));
 }