public static ReturnClass FunReturnClas() { ReturnClass r = new ReturnClass(); Logger.Log("====+++++++++++++++"); return(r); }
private void btnActionReturnItems_Click(object sender, EventArgs e) { try { /*1 Validations * 2 GET CART ITEMS * 3 GET GRAND TOTAL FROM ORDERS * 4 GET CUSTOMER DETAILS * 5 GET INVOICE DATE */ #region VALIDATIONS btnProcessOrder.Enabled = false; btnSelectCustomer.Enabled = false; btnProcessUpdate.Enabled = false; btnProcessReturn.Enabled = true; dgvCustomer.Enabled = false; #endregion #region GET CART ITEMS dgvCart.DataSource = null; DataSet CartDS = ReturnClass.SelectCartItems(txtUpdateOrderNo.Text); dgvCart.DataSource = CartDS.Tables[0].DefaultView; #endregion #region GET GRAND TOTAL FROM ORDER if (CartDS.Tables[0].Rows.Count > 0) { txtTotalPayment.Text = CartDS.Tables[0].Rows[0]["TotalPayment"].ToString(); } else if (CartDS.Tables[0].Rows.Count <= 0) { MessageBox.Show("No Record Found. Try Again.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } #endregion #region GET CUSTOMER NAME AND ID if (CartDS.Tables[0].Rows.Count > 0) { txtCustID.Text = CartDS.Tables[0].Rows[0]["CustomerID"].ToString(); txtCustName.Text = CartDS.Tables[0].Rows[0]["CustomerName"].ToString(); } #endregion #region GET INVOICE DATE if (CartDS.Tables[0].Rows.Count > 0) { txtInvDate.Text = CartDS.Tables[0].Rows[0]["TransactionDate"].ToString(); } #endregion } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { panelAction.Visible = false; } }
private ReturnClass ReturnAClass() { var ret = new ReturnClass { A = "123456778", B = "123456778", C = "123456778", D = "123456778", E = false, F = true }; return(ret); }
/// <summary> /// The change image caption. /// </summary> /// <param name="imageID"> /// The Image id. /// </param> /// <param name="newCaption"> /// The New caption. /// </param> /// <returns> /// the return object. /// </returns> public static ReturnClass ChangeImageCaption(int imageID, [NotNull] string newCaption) { // load the DB so YafContext can work... CodeContracts.ArgumentNotNull(newCaption, "newCaption"); YafContext.Current.Get <StartupInitializeDb>().Run(); // newCaption = System.Web.HttpUtility.HtmlEncode(newCaption); LegacyDb.album_image_save(imageID, null, newCaption, null, null, null); var returnObject = new ReturnClass { NewTitle = newCaption }; returnObject.NewTitle = (newCaption == string.Empty) ? YafContext.Current.Get <ILocalization>().GetText("ALBUM", "ALBUM_IMAGE_CHANGE_CAPTION") : newCaption; returnObject.Id = imageID.ToString(); return(returnObject); }
/// <summary> /// The change album title. /// </summary> /// <param name="albumId"> /// The album id. /// </param> /// <param name="newTitle"> /// The New title. /// </param> /// <returns> /// the return object. /// </returns> public ReturnClass ChangeAlbumTitle(int albumId, [NotNull] string newTitle) { // load the DB so BoardContext can work... CodeContracts.VerifyNotNull(newTitle, "newTitle"); this.Get <StartupInitializeDb>().Run(); this.GetRepository <UserAlbum>().UpdateTitle(albumId, newTitle); var returnObject = new ReturnClass { NewTitle = newTitle }; returnObject.NewTitle = newTitle == string.Empty ? this.Get <ILocalization>().GetText("ALBUM", "ALBUM_CHANGE_TITLE") : newTitle; returnObject.Id = $"0{albumId.ToString()}"; return(returnObject); }
/// <summary> /// The change album title. /// </summary> /// <param name="albumId"> /// The album id. /// </param> /// <param name="newTitle"> /// The New title. /// </param> /// <returns> /// the return object. /// </returns> public static ReturnClass ChangeAlbumTitle(int albumId, [NotNull] string newTitle) { // load the DB so YafContext can work... CodeContracts.VerifyNotNull(newTitle, "newTitle"); YafContext.Current.Get <StartupInitializeDb>().Run(); // newTitle = System.Web.HttpUtility.HtmlEncode(newTitle); LegacyDb.album_save(albumId, null, newTitle, null); var returnObject = new ReturnClass { NewTitle = newTitle }; returnObject.NewTitle = (newTitle == string.Empty) ? YafContext.Current.Get <ILocalization>().GetText("ALBUM", "ALBUM_CHANGE_TITLE") : newTitle; returnObject.Id = "0{0}".FormatWith(albumId.ToString()); return(returnObject); }
/// <summary> /// The change image caption. /// </summary> /// <param name="imageId"> /// The Image id. /// </param> /// <param name="newCaption"> /// The New caption. /// </param> /// <returns> /// the return object. /// </returns> public ReturnClass ChangeImageCaption(int imageId, [NotNull] string newCaption) { // load the DB so BoardContext can work... CodeContracts.VerifyNotNull(newCaption, "newCaption"); this.Get <StartupInitializeDb>().Run(); this.GetRepository <UserAlbumImage>().UpdateCaption(imageId, newCaption); var returnObject = new ReturnClass { NewTitle = newCaption }; returnObject.NewTitle = newCaption == string.Empty ? this.Get <ILocalization>().GetText( "ALBUM", "ALBUM_IMAGE_CHANGE_CAPTION") : newCaption; returnObject.Id = imageId.ToString(); return(returnObject); }
/// <summary> /// The change image caption. /// </summary> /// <param name="imageId"> /// The Image id. /// </param> /// <param name="newCaption"> /// The New caption. /// </param> /// <returns> /// the return object. /// </returns> public static ReturnClass ChangeImageCaption(int imageId, [NotNull] string newCaption) { // load the DB so YafContext can work... CodeContracts.VerifyNotNull(newCaption, "newCaption"); YafContext.Current.Get <StartupInitializeDb>().Run(); // newCaption = System.Web.HttpUtility.HtmlEncode(newCaption); YafContext.Current.GetRepository <UserAlbumImage>().UpdateCaption(imageId, newCaption); var returnObject = new ReturnClass { NewTitle = newCaption }; returnObject.NewTitle = (newCaption == string.Empty) ? YafContext.Current.Get <ILocalization>() .GetText("ALBUM", "ALBUM_IMAGE_CHANGE_CAPTION") : newCaption; returnObject.Id = imageId.ToString(); return(returnObject); }
static void Main(string[] args) { List <Children> someStudents = new List <Children>() { new Children() { FirstName = "Pero", LastName = "Goshev", Grades = 2, DateOfBirth = new DateTime(1973, 4, 15) }, new Children() { FirstName = "Pablo", LastName = "Eskobar", Grades = 4, DateOfBirth = new DateTime(1989, 12, 12) }, new Children() { FirstName = "Goce", LastName = "Delcev", Grades = 5, DateOfBirth = new DateTime(2003, 4, 5) }, new Children() { FirstName = "Goce", LastName = "Sedlovski", Grades = 3, DateOfBirth = new DateTime(1998, 8, 7) }, new Children() { FirstName = "Biljana", LastName = "Crvenkovska", Grades = 5, DateOfBirth = new DateTime(2014, 9, 23) }, }; someStudents.ForEach(s => s.ShowAge()); foreach (var student in someStudents) { Console.WriteLine(ReturnClass.ReturnFirstNames(someStudents)); } //foreach (var item in someStudents) //{ //} Console.ReadLine(); }
/// <summary> /// The change image caption. /// </summary> /// <param name="imageID"> /// The Image id. /// </param> /// <param name="newCaption"> /// The New caption. /// </param> /// <returns> /// the return object. /// </returns> public static ReturnClass ChangeImageCaption(int imageID, [NotNull] string newCaption) { // load the DB so YafContext can work... CodeContracts.VerifyNotNull(newCaption, "newCaption"); YafContext.Current.Get<StartupInitializeDb>().Run(); // newCaption = System.Web.HttpUtility.HtmlEncode(newCaption); LegacyDb.album_image_save(imageID, null, newCaption, null, null, null); var returnObject = new ReturnClass { NewTitle = newCaption }; returnObject.NewTitle = (newCaption == string.Empty) ? YafContext.Current.Get<ILocalization>().GetText("ALBUM", "ALBUM_IMAGE_CHANGE_CAPTION") : newCaption; returnObject.Id = imageID.ToString(); return returnObject; }
/// <summary> /// The change album title. /// </summary> /// <param name="albumID"> /// The album id. /// </param> /// <param name="newTitle"> /// The New title. /// </param> /// <returns> /// the return object. /// </returns> public static ReturnClass ChangeAlbumTitle(int albumID, [NotNull] string newTitle) { // load the DB so YafContext can work... CodeContracts.VerifyNotNull(newTitle, "newTitle"); YafContext.Current.Get<StartupInitializeDb>().Run(); // newTitle = System.Web.HttpUtility.HtmlEncode(newTitle); LegacyDb.album_save(albumID, null, newTitle, null); var returnObject = new ReturnClass { NewTitle = newTitle }; returnObject.NewTitle = (newTitle == string.Empty) ? YafContext.Current.Get<ILocalization>().GetText("ALBUM", "ALBUM_CHANGE_TITLE") : newTitle; returnObject.Id = "0{0}".FormatWith(albumID.ToString()); return returnObject; }
public static ReturnClass FunReturnClas() { ReturnClass r = new ReturnClass(); Debug.Log("====+++++++++++++++"); return r; }
public void ShowAge() { ReturnClass.ReturnDate(DateOfBirth); Age = ReturnClass.alloo; Console.WriteLine($"{Age}"); }