public JsonResult EntranceListDateAll() { JsonResult m_json = new JsonResult(); try { int iClassID = Pv.Pint(Request["ClassID"]); DateTime dtmDate = Pv.PDate(Request["Tarih"]); RetCode oRet = Util.DB.RunTable("EntranceListDateAll", iClassID, dtmDate); DataTable dtRooms = oRet.ToTable; m_json.Data = new { recordCount = dtRooms.Rows.Count, success = true, failure = false, error = "", data = Util.GetJsonData(dtRooms) }; m_json.JsonRequestBehavior = JsonRequestBehavior.AllowGet; } catch (Exception eX) { Util.WriteLog(eX); } return(m_json); }
public string ReadBarkod() { string strReturn = ""; try { int iClassID = Pv.Pint(Request["ClassID"]); string strCardNumber = Pv.Pstr(Request["CardNumber"]); if (iClassID == 0) { return("-4"); } RetCode oRet = Util.DB.RunTable("ReadBarcode", iClassID, strCardNumber); if (oRet.iRet == Back.Ok) { strReturn = oRet.ToRow["Done"].ToString(); } } catch (Exception eX) { Util.WriteLog(eX); } return(strReturn); }
public string DeleteStudent() { //bir odaya bağlımı kontrol et öyle sil string strReturn = ""; try { //schedule varsa silme int iStudentID = Pv.Pint(Request["StudentID"]); RetCode oRet = Util.DB.RunTable("StudentDelete", iStudentID); if (oRet.iRet == Back.Ok) { strReturn = "1"; } } catch (Exception eX) { Util.WriteLog(eX); } return(strReturn); }
//[HttpPost] //public HttpResponseMessage PostOrder(HttpRequestMessage request) //{ // string body = request.Content.ReadAsStringAsync().Result; // var siparisList = JsonConvert.DeserializeObject<List<JsSiparis>>(body); //} public string SaveClass() { string strReturn = ""; try { int iClassID = Pv.Pint(Request["ClassID"]); int iOperation = Pv.Pint(Request["Operation"]); string strClassName = Pv.Pstr(Request["ClassName"]); int iWorkDay = Pv.Pint(Request["WorkDay"]); string strStartTime = Pv.Pstr(Request["StartTime"]); string strEndTime = Pv.Pstr(Request["EndTime"]); if (iOperation == 1)//yeni { RetCode oRet = Util.DB.RunTable("ClassInsert", strClassName, iWorkDay, strStartTime, strEndTime); iClassID = Pv.Pint(oRet.ToRow[0]); strReturn = iClassID.ToString(); } else if (iOperation == 2)//edit { RetCode oRet = Util.DB.Run("ClassUpdate", iClassID, strClassName, iWorkDay, strStartTime, strEndTime); strReturn = "1"; } } catch (Exception eX) { Util.WriteLog(eX); } return(strReturn); }
public static int GetBarcodeMainID(string strBarcode) { int iBarcodeMainID = 0; try { RetCode mRet = Util.DB.RunTable("GetBarcodeMainID", strBarcode); if (mRet.iRet == Back.Ok) { iBarcodeMainID = Pv.Pint(mRet.ToRow["BarcodeMainID"]); } } catch (Exception eX) { Util.WriteLog(eX); } return(iBarcodeMainID); }
public string SaveStudent() { string strReturn = ""; try { int iOperation = Pv.Pint(Request["Operation"]); int iStudentID = Pv.Pint(Request["StudentID"]); int iClassID = Pv.Pint(Request["ClassID"]); string strCardNumber = Pv.Pstr(Request["CardNumber"]); string strStudentName = Pv.Pstr(Request["StudentName"]); if (iOperation == 1)//yeni { RetCode oRet = Util.DB.RunTable("StudentInsert", iClassID, strCardNumber, strStudentName); iStudentID = Pv.Pint(oRet.ToRow[0]); strReturn = iStudentID.ToString(); } else if (iOperation == 2)//edit { RetCode oRet = Util.DB.Run("StudentUpdate", iStudentID, iClassID, strCardNumber, strStudentName); strReturn = "1"; } } catch (Exception eX) { Util.WriteLog(eX); } return(strReturn); }
public string Entrance() { string strReturn = ""; try { //https://attendance.tayeks.com.tr/Out/Entrance?SectionNumber=17&CardNumber=001 //her bölümün cihaz no su var int iClassID = Pv.Pint(Request["SectionNumber"]); string strCardNumber = Pv.Pstr(Request["CardNumber"]); if (iClassID <= 0 || strCardNumber.Length == 0) { return("-4"); } RetCode oRet = Util.DB.RunTable("ReadBarcode", iClassID, strCardNumber); if (oRet.iRet == Back.Ok) { strReturn = oRet.ToRow["Done"].ToString(); //-1 ise bölüme ait kart değil veya kart no hatalı //-2 ise bu güne ait kayıt var //-3 ise zaman bölüm sıkıntısı var bölüm de tanımlı zaman içinde değil giriş yapılan zaman if (Pv.Pint(strReturn) > 0) { strReturn = "1"; } } } catch (Exception eX) { Util.WriteLog(eX); } return(strReturn); }