public JsonResult CodeTypeDelete(string codetype) { var item = COD.FindItemByParam <CodeTypeItem>(new DbParam().Add("CodeType", codetype), "*"); COD.Delete(item); return(Json(new { result = "success" }, JsonRequestBehavior.AllowGet)); }
public JsonResult CodeTypeWrite(CodeTypeItem item) { item.State = "REG"; item.RegDate = DateTime.Now; COD.Insert(item); return(Json(new { result = "success" }, JsonRequestBehavior.AllowGet)); }
public JsonResult GetUserProfile(string username) { return new JsonResult() { Data = COD.GetUserProfile("v2", "wwii", "psn", username) }; }
public JsonResult GetRecentMatches(string username, int days) { return new JsonResult() { Data = COD.GetRecentMatches("v2", "wwii", "psn", username ?? "YOUTUBE__Kor3aYn", days) }; }
public ActionResult COD() { COD c = new COD(); c.fail = null; return(View(c)); }
public W49020(string programID, string programName) : base(programID, programName) { InitializeComponent(); this.Text = _ProgramID + "─" + _ProgramName; cod = new COD(); dao49020 = new D49020(); }
public W30592(string programID, string programName) : base(programID, programName) { InitializeComponent(); this.Text = _ProgramID + "─" + _ProgramName; dao30592 = new D30592(); daoCod = new COD(); }
public JsonResult CodeTypeUpdate(string codetype, FormCollection formValues) { var item = COD.FindItemByParam <CodeTypeItem>(new DbParam().Add("CodeType", codetype), "*"); UpdateModel(item); COD.Update(item); return(Json(new { result = "success" }, JsonRequestBehavior.AllowGet)); }
public ActionResult Index() { var leaderboard = COD.GetUserProfile("v2", "wwii", "psn", "Cronotrigga8"); var myLeaderBoard = COD.GetLeaderBoardByUsername("v2", "wwii", "psn", "alltime", "core", "career", "YOUTUBE__Kor3aYn"); var pageLeaderBoard = COD.GetLeaderBoardByPage("v2", "wwii", "psn", "alltime", "core", "career", 4); var matches = COD.GetRecentMatches("v2", "wwii", "psn", "YOUTUBE__Kor3aYn", 1); return View(); }
public ActionResult AccountList() { var list = COD.FindAll <AccountItem>(); var param = new CommonParam(); param.Add("List", list); return(View(param)); }
public JsonResult AccountUpdate(int id, FormCollection formValues) { var item = COD.FindItemById <AccountItem>(id); UpdateModel(item); COD.Update(item); return(Json(new { result = "success" }, JsonRequestBehavior.AllowGet)); }
public ActionResult COD(COD c) { Model_clienti model1; id = c.id; model1 = Repository_clienti.Cautare_client(id); return(RedirectToAction("Actualizare_client", model1)); }
protected void Page_Init(object sender, EventArgs e) { // Naviagtor assigned //WebNavBar1.GridID = UltraWebGrid1.UniqueID; // FreightEasyData Initialized FreightEasy.DataManager.FreightEasyData feData = new FreightEasy.DataManager.FreightEasyData(); feData.AddToDataSet("Ports", "SELECT port_code + ' - ' + port_desc as port_name,port_code FROM port WHERE elt_account_number=" + elt_account_number + " AND ISNULL(port_id,'')<>'' ORDER BY port_desc"); feData.AddToDataSet("Countries", "SELECT * FROM country_code WHERE elt_account_number=" + elt_account_number + " order by country_name"); feData.AddToDataSet("MOT", "SELECT code_id,code_desc FROM aes_codes WHERE code_type='Transport Code' ORDER BY code_id"); feData.AddToDataSet("Carriers", "SELECT ISNULL(carrier_id,'') AS carrier_code,LEFT(dba_name,22) AS carrier_name FROM organization WHERE is_carrier='Y' AND ISNULL(carrier_id,'') <> '' AND ISNULL(carrier_code,'')<>'' AND elt_account_number=" + elt_account_number + " ORDER BY dba_name"); // Form initialize POE.DataSource = feData.Tables["Ports"]; POE.DataTextField = "port_name"; POE.DataValueField = "port_code"; POE.DataBind(); POE.Items.Insert(0, new ListItem("", "")); POU.DataSource = feData.Tables["Ports"]; POU.DataTextField = "port_name"; POU.DataValueField = "port_code"; POU.DataBind(); POU.Items.Insert(0, new ListItem("", "")); COD.DataSource = feData.Tables["Countries"]; COD.DataTextField = "country_name"; COD.DataValueField = "country_code"; COD.DataBind(); COD.Items.Insert(0, new ListItem("", "")); MOT.DataSource = feData.Tables["MOT"]; MOT.DataTextField = "code_desc"; MOT.DataValueField = "code_id"; MOT.DataBind(); MOT.Items.Insert(0, new ListItem("", "")); lstCarrier.DataSource = feData.Tables["Carriers"]; lstCarrier.DataTextField = "carrier_name"; lstCarrier.DataValueField = "carrier_code"; lstCarrier.DataBind(); lstCarrier.Items.Insert(0, new ListItem("", "")); hFileType.Value = move_type; // New AES if (aes_id == "" || aes_id == "0") { labelPageTitle.Text = "New AES Form"; trInfo1.Visible = false; trInfo2.Visible = false; } // Saved AES else { labelPageTitle.Text = "Edit AES Form"; } }
public ActionResult CodeUpdateFor(string code) { var item = COD.FindItemByParam <CodeItem>(new DbParam().Add("Code", code), "*"); var commonParam = new CommonParam(); commonParam.Add("Item", item); commonParam.Add("state", MvcUtil.GetSelectList(item.State, "REG=REG,DEL=DEL")); return(PartialView("~/Views/Dev/Partial/CodeList/CodeUpdatePartial.cshtml", commonParam)); }
protected void Page_Init(object sender, EventArgs e) { LoadUserInfo(); if (!IsPostBack) { LoadParameters(); CheckExistingAES(); } // FreightEasyData Initialized FreightEasy.DataManager.FreightEasyData feData = SetDataList(); // Form initialize POE.DataSource = feData.Tables["Ports"]; POE.DataTextField = "port_name"; POE.DataValueField = "port_code"; POE.DataBind(); POE.Items.Insert(0, new ListItem("", "")); POU.DataSource = feData.Tables["Ports"]; POU.DataTextField = "port_name"; POU.DataValueField = "port_code"; POU.DataBind(); POU.Items.Insert(0, new ListItem("", "")); COD.DataSource = feData.Tables["Countries"]; COD.DataTextField = "country_name"; COD.DataValueField = "country_code"; COD.DataBind(); COD.Items.Insert(0, new ListItem("", "")); MOT.DataSource = feData.Tables["MOT"]; MOT.DataTextField = "code_desc"; MOT.DataValueField = "code_id"; MOT.DataBind(); MOT.Items.Insert(0, new ListItem("", "")); lstCarrier.DataSource = feData.Tables["Carriers"]; lstCarrier.DataTextField = "carrier_name"; lstCarrier.DataValueField = "carrier_code"; lstCarrier.DataBind(); lstCarrier.Items.Insert(0, new ListItem("", "")); hFileType.Value = move_type; // New AES if (string.IsNullOrEmpty(AESID)) { labelPageTitle.Text = "New AES Form"; trInfo1.Visible = false; trInfo2.Visible = false; } // Saved AES else { labelPageTitle.Text = "Edit AES Form"; } }
public ActionResult CodeList() { var list = COD.FindAll <CodeTypeItem>(); var codelist = COD.FindAll <CodeItem>(); var param = new CommonParam(); param.Add("List", list); param.Add("CodeList", codelist); return(View(param)); }
protected override ResultStatus Open() { base.Open(); try { lupKind = new RepositoryItemLookUpEdit(); lupForeign = new RepositoryItemLookUpEdit(); lupCurrency = new RepositoryItemLookUpEdit(); lupAmt = new RepositoryItemLookUpEdit(); COD cod = new COD(); //商品類別 //DataTable dtKind = cod.ListByCol("MGT8" , "MGT8_KIND_TYPE" , " " , " "); DataTable dtKind = new CODW().ListLookUpEdit("49061", "49061_MGT8_KIND_TYPE"); Extension.SetColumnLookUp(lupKind, dtKind, "CODW_ID", "CODW_DESC", TextEditStyles.DisableTextEditor, ""); gcMain.RepositoryItems.Add(lupKind); //國內外 CI.CODW參數為(國內 : "N" 國外: "Y") //List<LookupItem> dtForeign = new List<LookupItem>(){ // new LookupItem() { ValueMember = " ", DisplayMember = "國內"}, // new LookupItem() { ValueMember = "Y", DisplayMember = "國外"}}; //lupForeign = new RepositoryItemLookUpEdit(); DataTable dtForeign = new CODW().ListLookUpEdit("49061", "49061_MGT2_ABROAD"); foreach (DataRow dr in dtForeign.Rows) { if (dr["CODW_ID"].AsString() == "N") { dr["CODW_ID"] = " "; } } lupForeign.SetColumnLookUp(dtForeign, "CODW_ID", "CODW_DESC", TextEditStyles.DisableTextEditor, null); gcMain.RepositoryItems.Add(lupForeign); //幣別 //DataTable dtCurrency = cod.ListByCol2("EXRT" , "EXRT_CURRENCY_TYPE"); DataTable dtCurrency = new CODW().ListLookUpEdit("49061", "49061_CURRENCY_TYPE"); Extension.SetColumnLookUp(lupCurrency, dtCurrency, "CODW_ID", "CODW_DESC", TextEditStyles.DisableTextEditor, ""); gcMain.RepositoryItems.Add(lupCurrency); //金額類型 //List<LookupItem> dtAmt = new List<LookupItem>(){ // new LookupItem() { ValueMember = "P", DisplayMember = "比例"}, // new LookupItem() { ValueMember = "A", DisplayMember = "金額"}}; //lupForeign = new RepositoryItemLookUpEdit(); DataTable dtAmt = new CODW().ListLookUpEdit("49061", "49061_AMT_TYPE"); lupAmt.SetColumnLookUp(dtAmt, "CODW_ID", "CODW_DESC", TextEditStyles.DisableTextEditor, null); gcMain.RepositoryItems.Add(lupAmt); Retrieve(); return(ResultStatus.Success); } catch (Exception ex) { WriteLog(ex); return(ResultStatus.Fail); } }
/// <summary> /// Generic way to send data to a COD (async to not make the ui laggy) /// </summary> /// <param name="address"></param> /// <param name="value"></param> private async void setFogAndDofValue(string address, float value) { await Task.Run(() => { if (COD.checkGame() && COD.GameName() == "t6mp") { dynamic cod = COD.Game(); t.Process_Handle(COD.GameName()); t.WriteFloat(cod.GetType().GetProperty(address).GetValue(cod), value); } }); }
public ActionResult AccountMultiExcelWriteFor() { var inOutCodeList = COD.FindListByParam <CodeItem>("Code", new DbParam().Add("CodeType", "INOUT"), "*"); var caseCodeList = COD.FindListByParam <CodeItem>("Code", new DbParam().Add("CodeType", "ACCOUNT"), "*"); var cardBankCodeList = COD.FindListByParam <CodeItem>("Code", new DbParam().Add("CodeType", "CARDBANK"), "*"); var commonParam = new CommonParam(); commonParam.Add("inOutCode", new SelectList(inOutCodeList, "Code", "CodeName", "")); commonParam.Add("caseCode", new SelectList(caseCodeList, "Code", "CodeName", "")); commonParam.Add("cardBankCode", new SelectList(cardBankCodeList, "Code", "CodeName", "")); return(PartialView("~/Views/Dev/Partial/AccountList/AccountMultiExcelWritePartial.cshtml", commonParam)); }
public ActionResult COD(COD c) { c.Verificare(); if (c.fail != null) { return(View(c)); } Model_clienti model1; id = c.id; model1 = Repository_clienti.Cautare_client(id); return(RedirectToAction("Actualizare_client", model1)); }
public void Test_COD_validare_ID_fail(string id) { //Arrange var cod = new COD(); cod.id = id; bool v; //Act v = cod.Valid_id(); //Assert Assert.IsFalse(v); }
public void Test_COD_verificare_string_fail(string id) { //Arrange var cod = new COD(); cod.id = id; bool v = true; //Act v = cod.Valid_string(); //Assert Assert.IsFalse(v); }
public void atualizalista() { ListaConta.Items.Clear(); SqlDataReader leitor; string DESCRI, SITU; int COD; DateTime DATAV; double VL; SqlCommand selecionafilme = new SqlCommand(); SqlConnection conexao = new SqlConnection(); conexao = new SqlConnection("Data Source = DESKTOP-L0FTKI7; Initial Catalog = ALTERNATIVA; Integrated Security=SSPI"); conexao.Open(); selecionafilme = new SqlCommand("select CODIGO AS COD, DESCRICAO as DESCRI,VALOR as VL,DATAV as DATAV, SITUACAO AS SITU from CONTAS WHERE DATAV >= '" + DTVencimento.Value + "' AND SITUACAO != 'Paga' ORDER BY DATAV ASC", conexao); leitor = selecionafilme.ExecuteReader(); while (leitor.Read() == true) { COD = int.Parse(leitor["COD"].ToString()); DESCRI = leitor["DESCRI"].ToString(); VL = double.Parse(leitor["VL"].ToString()); DATAV = DateTime.Parse(leitor["DATAV"].ToString()); SITU = leitor["SITU"].ToString(); ListViewItem itemLista = new ListViewItem(COD.ToString()); ListViewItem.ListViewSubItem subitemLista = new ListViewItem.ListViewSubItem(itemLista, DESCRI); itemLista.SubItems.Add(subitemLista); subitemLista = new ListViewItem.ListViewSubItem(itemLista, VL.ToString("0.00")); itemLista.SubItems.Add(subitemLista); subitemLista = new ListViewItem.ListViewSubItem(itemLista, DATAV.ToShortDateString()); itemLista.SubItems.Add(subitemLista); subitemLista = new ListViewItem.ListViewSubItem(itemLista, SITU); itemLista.SubItems.Add(subitemLista); ListaConta.Items.Add(itemLista); } leitor.Close(); conexao.Close(); contasdodia(); }
private void timer_macro_Tick(object sender, EventArgs e) { if (COD.checkGame()) { lbl_gameName.Text = COD.LongGameName(); } foreach (Macro macro in GetMacros()) { if (GetAsyncKeyState((Keys)Enum.Parse(typeof(Keys), ((Keys)macro.Key).ToString()))) { SendDvarToGame(File.ReadAllText(macro.CfgPath)); } } }
public void Test_COD_POST_good() { //Arrange var controller = new HomeController(); var cod = new COD(); cod.id = "1"; //Act var insert = controller.Rezervare(model_client); var result = controller.COD(cod); //Assert Assert.IsInstanceOf <RedirectToActionResult>(result); }
public void Test_COD_POST_fail_id() { //Arrange var controller = new HomeController(); var cod = new COD(); cod.id = "1"; cod.fail = "ceva"; //Act var result = controller.COD(cod); //Assert Assert.IsInstanceOf <ViewResult>(result); }
public String ToJSONString() { var phStr = "PH: " + PH.ToString("F5"); var doStr = "DO: " + DO.ToString("F5"); var bod5Str = "BOD5: " + BOD5.ToString("F5"); var codStr = "COD: " + COD.ToString("F5"); var nh4nStr = "NH4-N: " + NH4N.ToString("F5"); var no2nStr = "NO2-N: " + NO2N.ToString("F5"); var no3nStr = "NO3-N: " + NO3N.ToString("F5"); var ssStr = "SS: " + SS.ToString("F5"); var clStr = "CL: " + CL.ToString("F5"); var cbStr = "CB: " + CB.ToString("F5"); return(phStr + ", " + doStr + ", " + bod5Str + ", " + codStr + ", " + nh4nStr + ", " + no2nStr + ", " + no3nStr + ", " + ssStr + ", " + clStr + ", " + cbStr); }
public void Test_COD_validare_ID_good(string id) { //Arrange var controller = new HomeController(); var cod = new COD(); cod.id = id; bool v; //Act var insert = controller.Rezervare(model_client); v = cod.Valid_id(); //Assert Assert.IsTrue(v); }
public ActionResult AccountUpdateFor(int id) { var inOutCodeList = COD.FindListByParam <CodeItem>("Code", new DbParam().Add("CodeType", "INOUT"), "*"); var caseCodeList = COD.FindListByParam <CodeItem>("Code", new DbParam().Add("CodeType", "ACCOUNT"), "*"); var cardBankCodeList = COD.FindListByParam <CodeItem>("Code", new DbParam().Add("CodeType", "CARDBANK"), "*"); var item = COD.FindItemById <AccountItem>(id); var commonParam = new CommonParam(); commonParam.Add("Item", item); commonParam.Add("inOutCode", new SelectList(inOutCodeList, "Code", "CodeName", item.InOutCode)); commonParam.Add("caseCode", new SelectList(caseCodeList, "Code", "CodeName", item.CaseCode)); commonParam.Add("cardBankCode", new SelectList(cardBankCodeList, "Code", "CodeName", item.CardBankCode)); commonParam.Add("state", MvcUtil.GetSelectList(item.State, "REG=REG,DEL=DEL")); return(PartialView("~/Views/Dev/Partial/AccountList/AccountUpdatePartial.cshtml", commonParam)); }
protected override ResultStatus AfterOpen() { daoCOD = new COD(); base.AfterOpen(); txtStartDate.EditValue = GlobalInfo.OCF_DATE.Year + "/01/01"; txtEndDate.DateTimeValue = GlobalInfo.OCF_DATE; //設定 dw_index //DataTable dwSource = daoCOD.ListByCol(_ProgramID , "PID-IDSTK" , "全部" , "%"); DataTable dwSource = new CODW().ListLookUpEdit("60420", "60420_PID_IDSTK"); Extension.SetDataTable(dw_index, dwSource, "CODW_ID", "CODW_DESC", TextEditStyles.DisableTextEditor, ""); dw_index.ItemIndex = 0; return(ResultStatus.Success); }