public static string GetQuarterlyOpening(int yr, int quarter) //Returns Month Opening Date in English { int[] nepaliDate = new int[3]; if (quarter == 1) { nepaliDate[0] = 4; nepaliDate[1] = 1; nepaliDate[2] = yr; } if (quarter == 2) { nepaliDate[0] = 7; nepaliDate[1] = 1; nepaliDate[2] = yr; } if (quarter == 3) { nepaliDate[0] = 10; nepaliDate[1] = 1; nepaliDate[2] = yr; } if (quarter == 4) { nepaliDate[0] = 1; nepaliDate[1] = 1; nepaliDate[2] = yr + 1; } return(ConvertNE.ConvertNToE(nepaliDate)); }
public static string GetQuaterlyClosing(int yr, int Quarter) //Returns Queterly Closing Date in English { int[] nepaliDate = new int[3]; if (Quarter == 1) { nepaliDate[0] = 7; nepaliDate[1] = 1; nepaliDate[2] = yr; } else if (Quarter == 2) { nepaliDate[0] = 10; nepaliDate[1] = 1; nepaliDate[2] = yr; } else if (Quarter == 3) { nepaliDate[0] = 1; nepaliDate[1] = 1; nepaliDate[2] = yr + 1; } else if (Quarter == 4) { nepaliDate[0] = 4; nepaliDate[1] = 1; nepaliDate[2] = yr + 1; } return(ConvertNE.ConvertNToE(nepaliDate)); }
public static string GetPreviousYr(string date) // Previous Date In English from Nepali Date { int[] dateint = new int[3]; dateint = StringToInt(date); dateint[2]--; return(ConvertNE.ConvertNToE(dateint)); }
public static string GetDate(int yr) { int[] nepaliDate = new int[3]; nepaliDate[0] = 4; nepaliDate[1] = 1; nepaliDate[2] = yr; return(ConvertNE.ConvertNToE(nepaliDate)); }
public static string GetMonthOpening1(int yr, int month) //Returns Month Opening Date in English { int[] nepaliDate = new int[3]; nepaliDate[0] = 1; nepaliDate[1] = month; nepaliDate[2] = yr; return(ConvertNE.ConvertNToE(nepaliDate)); }
public static string GetMonthClosing(int yr, int month) //Returns Next Month Opening Date in English { int[] nepaliDate = new int[3]; nepaliDate[0] = month + 1; nepaliDate[1] = 1; nepaliDate[2] = yr; if (nepaliDate[0] > 12) { nepaliDate[0] -= 12; nepaliDate[2]++; } return(ConvertNE.ConvertNToE(nepaliDate)); }
public static string GetPreviousFiscalYearEnd(int yr, int month) { int[] nepaliDate = new int[3]; if (month < 4) { nepaliDate[0] = 4; nepaliDate[1] = 1; nepaliDate[2] = yr; } else { nepaliDate[0] = 4; nepaliDate[1] = 1; nepaliDate[2] = yr + 1; } return(ConvertNE.ConvertNToE(nepaliDate)); }
public DateTime GetNextMonth(DateTime d) { string nDate = ConvertNE.ConvertEToN(d); int[] a = DateStringToInt.StringToInt(nDate); a[0] = a[0] + 1; if (a[0] > 12) { a[0] = 1; a[2] = a[2] + 1; } else { a[2] = a[2]; } return(DateTime.Parse(ConvertNE.ConvertNToE(a))); }
public static string GetHalfYearlyClosing(int yr, int HalfYear) //Returns Half Yearly Closing Date in English { int[] nepaliDate = new int[3]; if (HalfYear == 1) { nepaliDate[0] = 10; nepaliDate[1] = 1; nepaliDate[2] = yr; } else if (HalfYear == 2) { nepaliDate[0] = 4; nepaliDate[1] = 1; nepaliDate[2] = yr + 1; } return(ConvertNE.ConvertNToE(nepaliDate)); }
protected void btn_insert_Click(object sender, EventArgs e) { if (tb_cash.Text == "") { tb_cash.Text = "0"; } //Label1.Text = ""; var url = "url"; var companyName = txtbox_companyName.Text; var companyName1 = companyName.Substring(0, 10); var cc = companyName.Length - 10; var companyName2 = companyName.Substring(10, cc); var conn = new SqlConnection(ConfigurationManager.ConnectionStrings["CSCommonDB"].ToString()); conn.Open(); var com = new SqlCommand(); com.CommandText = "Insert_Company"; com.Connection = conn; com.CommandType = CommandType.StoredProcedure; com.Parameters.AddWithValue("@cName", txtbox_companyName.Text); com.Parameters.AddWithValue("@regNo", DESEncrypt(txtbox_registrationNo.Text)); com.Parameters.AddWithValue("@panNo", DESEncrypt(txtbox_panNo.Text)); com.Parameters.AddWithValue("@country", DESEncrypt(txtbox_country.Text)); com.Parameters.AddWithValue("@state", DESEncrypt(txtbox_state.Text)); com.Parameters.AddWithValue("@city", DESEncrypt(txtbox_city.Text)); com.Parameters.AddWithValue("@add1", DESEncrypt(txtbox_add.Text)); com.Parameters.AddWithValue("@add2", DESEncrypt(txtbox_add2.Text)); com.Parameters.AddWithValue("@tel", DESEncrypt(txtbox_telephoneNo.Text)); com.Parameters.AddWithValue("@logo", url); com.Parameters.AddWithValue("@email", DESEncrypt(txtbox_emailAddress.Text)); com.Parameters.AddWithValue("@web", DESEncrypt(txtbox_webAddress.Text)); com.Parameters.AddWithValue("@closingAmt", decimal.Parse(tb_cash.Text)); com.Parameters.AddWithValue("@dates", DateTime.Parse(ConvertNE.ConvertNToE(DateStringToInt.StringToInt(tb_date.Text)))); com.Parameters.AddWithValue("@C1", DESEncrypt(companyName1)); com.Parameters.AddWithValue("@C2", DESEncrypt(companyName2)); com.ExecuteNonQuery(); //insert pic //FormView1.DataBind(); }
public static string GetPreviousYr1(string date) // Previous Date In English from Nepali Date { string[] dateint = new string[3]; int[] date1 = new int[3]; dateint = date.Split('/'); if (int.Parse(dateint[1]) < 4) { date1[0] = 4; date1[1] = 1; date1[2] = int.Parse(dateint[0]) - 1; } else { date1[0] = 4; date1[1] = 1; date1[2] = int.Parse(dateint[0]); } string date2 = ConvertNE.ConvertNToE(date1); return(date2); }
public static string GetWeekOpening(int yr, int month, int Week) //Returns Month Opening Date in English { int[] nepaliDate = new int[3]; nepaliDate[0] = month; nepaliDate[1] = 1; nepaliDate[2] = yr; if (Week == 1) { nepaliDate[1] = 1; } else if (Week == 2) { nepaliDate[1] = 8; } else if (Week == 3) { nepaliDate[1] = 15; } else { nepaliDate[1] = 22; } return(ConvertNE.ConvertNToE(nepaliDate)); }
private void ViewDetails(string invoiceNo) { mpeDetails.Show(); lblInvoiceNo.Text = invoiceNo; gvOrderedDetails.DataSource = BllImportExcel.GetImportListByDate(4, int.Parse(ddlBranch.SelectedValue), ddlSeason.SelectedValue, invoiceNo, DateTime.Parse(ConvertNE.ConvertNToE(DateStringToInt.StringToInt(txtDate.Text)))); gvOrderedDetails.DataBind(); }
public void FillGridView() { gvOrderList.DataSource = BllImportExcel.GetImportListByDate(3, int.Parse(ddlBranch.SelectedValue), ddlSeason.SelectedValue, "", DateTime.Parse(ConvertNE.ConvertNToE(DateStringToInt.StringToInt(txtDate.Text)))); gvOrderList.DataBind(); }
private void ViewDetails(string orderedId) { mpeDetails.Show(); lblOrderNo.Text = orderedId; gvOrderedDetails.DataSource = BL_OrderedExcel.GetOrderedListByDate(3, int.Parse(ddlBranch.SelectedValue), ddlSeason.SelectedValue, orderedId.ToString(), DateTime.Parse(ConvertNE.ConvertNToE(DateStringToInt.StringToInt(txtDate.Text)))); gvOrderedDetails.DataBind(); }