This is my technical area for troubleshooting and learning new programming skills and much more. Here, you will find answers on a wide range of technologies such as AI, Machine Learning, OpenAI, Databricks, ASP.NET, C#, Python, Microsoft Access, MySQL, Amazon Web Services, SQL Server, PL/SQL, JD Edwards, SAS, Salesforce, APIs, MVC, and many others. Please feel free to visit and join the discussion!
Wednesday, February 24, 2010
Wednesday, February 17, 2010
Send Mass Email With Image ASP.NET C# sql-server
using
System.Data;using
System.Configuration;using
System.Net.Mail;using
System.Net.Mime;using
System.Collections.Generic;using
System.Web;using
System.Web.UI;using
System.Web.UI.WebControls;using
System.Data.SqlClient;
public
partial class sndmail : System.Web.UI.Page{
string strSQL; string txtEmail; protected void Page_Load(object sender, EventArgs e){
//Label1.Style.Add(
HtmlTextWriterStyle.BackgroundImage, "url(images//visliXmasFlyer2009.jpg)");}
protected void Button3_Click(object sender, EventArgs e){
ReadDB();
}
void ReadDB(){
SqlConnection myConnection = new SqlConnection(ConnectionString);strSQL =
"select * from mEmailList "; SqlCommand cmd = new SqlCommand(strSQL, myConnection);myConnection.Open();
SqlDataReader myReader = cmd.ExecuteReader(CommandBehavior.CloseConnection); // lableadid.Text = Request["LeadID"].ToString(); while (myReader.Read()){
Response.Write(txtEmail);
txtEmail = myReader[
"EmailID"].ToString();sndaamail();
}
myReader.Close();
myConnection.Close();
}
void sndaamail(){
string strMailContent = "<b><center><a href=http://visli.com> visli Warehouse Sale Coupon</a></center></b>"; string fromAddress = webmaster@visli.com; string toAddress = txtEmail.ToString(); string contentId = "image1"; string path = Server.MapPath(@"images/visliXmasFlyer2009.jpg"); // my logo is placed in images folder MailMessage mailMessage = new MailMessage(fromAddress, toAddress); //mailMessage.Bcc.Add(shivaliv@visli.com); // put your id heremailMessage.Subject =
"visli Warehouse Sale Coupon"; LinkedResource logo = new LinkedResource(path);logo.ContentId =
"companylogo"; // done HTML formatting in the next line to display my logo AlternateView av1 = AlternateView.CreateAlternateViewFromString("<html><body><a href=http://visli.com><img src=http://visli.com/images/visliXmasFlyer2009.jpg width=570px height=825px></a><br></body></html>" + strMailContent, null, MediaTypeNames.Text.Html);av1.LinkedResources.Add(logo);
mailMessage.AlternateViews.Add(av1);
mailMessage.IsBodyHtml =
true; //SmtpClient mailSender = new SmtpClient("10.0.1.32"); SmtpClient mailSender = new SmtpClient("mail.xxxxx.com");mailSender.Send(mailMessage);
}
private string ConnectionString{
get{
string connectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString; return connectionString;}
}
}
Friday, February 12, 2010
Invalid parameter Manual payment Batch(M) - JD Edwards
This batch was mix with Domestic and Foreign currency and while posting got error in work center invalid parameter, to fix this Went to the file F0413 with Batch# found paymeny ID and modify all domastic payment As these entries are posted, using sql modify F0414 field RNPOST to D and also F0413 - RMISTP field to D. after that posted that batch, all entries got posted, After that reverse back above fields to P and posted that batch again, batch posted with no errors. So I took 2 steps to fix this batch.
Hotmail: Free, trusted and rich email service. Get it now.
Thursday, February 11, 2010
JD Edwards Mass Cost update for Items With Onhand Qty in inventory
Mass Cost update for Items With Onhand Qty in inventory
Today I did mass cost update by using Z-file Method
I order to do cost existing cost method cost update like 02 cost , you have to do following steps:
1. Populate F4105Z1 file using P4105Z1 Program these fields liitm,imlitm,limcu,'JDEIC' TranType,'A' "Transaction Action" ,'IC' CostMethod,'1' DirInd, UNCS Cost/Price.
2. Run R4105Z1I.
3. Check F4105 File if this created IC entries for the items you wanted to update cost(UNCS).Also check F4111 if this program created records in this file means you are doing something wrong. Check costing selc purchasaing , this field must keep Blank.Also see F0911 for no record created.
4. After that run R41052 in processing option put cost Method 02 (Depends on you which cost type you want to update)
and Doc type - IB in purge record put 1.
after this run you will see IB batch will create. so inventory cost is correct and GL is correct also.
How to See Macro VB Code In Excel?
How to Run an Access Query / Macro From Excel Spreadsheet?
Dim A As Object
Application.DisplayAlerts = False
Set A = CreateObject("Access.Application")
A.Visible = False
A.OpenCurrentDatabase ("Path of your database")
A.DoCmd.RunMacro "Name of your macro"
Application.DisplayAlerts = True
End Sub
Thursday, January 28, 2010
Gridview Theme css not working in ie8
Monday, January 11, 2010
How to stop repeat in column value using datagrid C#?
string acc5;
string acc6;
public void productsGridView_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e)
{
if ((e.Row.RowType == DataControlRowType.DataRow))
{
acc6 = e.Row.Cells[2].Text;
if (e.Row.Cells[2].Text == acc5)
{
acc6 = e.Row.Cells[2].Text;
e.Row.Cells[2].Text = "";
}
acc5 = acc6;
}
}
Thursday, January 7, 2010
Insert Dynamic Rows in Gridview
in row RowDataBound use this code
Table tbl = e.Row.Parent as Table;
if (tbl != null)
{
GridViewRow row = new GridViewRow(-1, -1, DataControlRowType.DataRow, DataControlRowState.Normal);
TableCell cell = new TableCell();
HtmlGenericControl span = new HtmlGenericControl("span");
span.InnerHtml = "Insert Row";
cell.Controls.Add(span);
row.Cells.Add(cell);
tbl.Rows.AddAt(tbl.Rows.Count - 1, row);
}
Wednesday, December 9, 2009
JD Edwards Create IItem BP/ Cost and location using SQL-server
create proc insert_IM_BP_CO as
declare @fmcu varchar(12)
declare @tmcu varchar(12)
set @fmcu='SOUTHAFRICA'
set @tmcu=' SAFRICA-INT'
drop table jde_rk.dbo.mar021
select * into jde_rk.dbo.mar021 from proddta.f41021 where ltrim(limcu) =@fmcu and lipqoh<>0 and lipbin='P'
update jde_rk.dbo.mar021 set limcu =@tmcu ,lipqoh=0,lipcom=0,lilrcj=0, liuser='SQL-SERVER',liupmj=109343
-----------------------------------------------
drop table jde_rk.dbo.mar02
select * into jde_rk.dbo.mar02 from proddta.f4102 where ibitm in(select liitm from jde_rk.dbo.mar021)
and ltrim(ibmcu) =@fmcu
update jde_rk.dbo.mar02 set IBmcu =@tmcu , ibuser='SQL-SERVER',IBupmj=109343
------------------------------
drop table jde_rk.dbo.mar05
select * into jde_rk.dbo.mar05 from proddta.f4105
where coitm in(select liitm from jde_rk.dbo.mar021) and ltrim(comcu) =@fmcu
update jde_rk.dbo.mar05 set comcu =@tmcu , couser='SQL-SERVER',coupmj=109343
-------
insert into proddta.f41021
select * from jde_rk.dbo.mar021
insert into proddta.f4102
select * from jde_rk.dbo.mar02
insert into proddta.f4105
select * from jde_rk.dbo.mar05