Anda di halaman 1dari 8

//day_report SqlCommand cmd = new SqlCommand("select uni_all as 'Voucher No',uni_pur as 'Purchase Voucher No',uni_sale as 'Sale Voucher No',challan_no as 'Challan

No',cast(purchase_date as varchar) as 'Date',(select name from party_master where id=stock_transaction.party_id) as 'Party Name',(select sum(total_amount) from amount_trans where uni_all=stock_transaction.uni_all) as 'Total Amount','-'+cast((select sum(amount_paid) from amount_trans where uni_all=stock_transaction.uni_all) as varchar) as 'Amount Paid','+'+cast((select sum(amount_received) from amount_trans where uni_all=stock_transaction.uni_all) as varchar) as 'Amount Received',Type,'view_detail.aspx?no='+cast(uni_all as varchar) as 'View' from stock_transaction where purchase_date between (@a) and (@b) group by uni_all,cast(purchase_date as varchar),type,party_id,uni_pur,uni_sale,challan_no ", con); cmd.Parameters.AddWithValue("@a",DateTime.Parse(txt_first_date.Text).ToString("MM/dd/yyyy")); SqlDataAdapter da = new SqlDataAdapter(cmd); dataGridView1.DataSource = dt; for (int i = 0; i < dataGridView1.Rows.Count - 1; i++) { string a = dataGridView1.Rows[i].Cells[4].Value.ToString(); a = a.Substring(0, 12); dataGridView1.Rows[i].Cells[4].Value = a; if (dataGridView1.Rows[i].Cells[7].Value.ToString() == "-0") { dataGridView1.Rows[i].Cells[7].Value = "0"; } if (dataGridView1.Rows[i].Cells[8].Value.ToString() == "+0") { dataGridView1.Rows[i].Cells[8].Value = "0"; //item report all SqlCommand cmd = new SqlCommand("select Name,Code,(select size from size_master where id=size_id) Size,Quantity,pur_rate as 'Purchase Rate',sale_rate as 'Sale rate',(select catagory from catagory_master where id=catagory_id) Category,Units from item_master order by catagory_id ", con); //item report namewise SqlCommand cmd = new SqlCommand("select cast(Name as varchar),cast(Code as varchar),cast((select size from size_master where id=size_id) as varchar) Size,cast(Quantity as varchar),cast(pur_rate as varchar) as 'Purchase Rate',cast(sale_rate as varchar) as 'Sale rate',cast((select catagory from catagory_master where id=catagory_id) as varchar) Category,Units from item_master where catagory_id='" + comboBox1.SelectedValue + "'", con); {string day_report = "c:\\Item_report_Category_Wise" + "-" + DateTime.Now.ToString("dd-MMMyyyy-H-mm-ss") + ".xls"; export_datagridview_to_excel(dataGridView1, day_report); }

public void export_datagridview_to_excel(DataGridView dgv, string excel_file) { int cols;//open file StreamWriter wr = new StreamWriter(excel_file); //determine the number of columns and write columns to file cols = dgv.Columns.Count; for (int i = 0; i < cols; i++) { wr.Write(dgv.Columns[i].Name.ToString().ToUpper() + "\t"); } wr.WriteLine(); //write rows to excel file for (int i = 0; i < (dgv.Rows.Count - 1); i++) { for (int j = 0; j < cols; j++) { if (dgv.Rows[i].Cells[j].Value != null) wr.Write(dgv.Rows[i].Cells[j].Value + "\t"); else

{ wr.Write("\t"); }} wr.WriteLine(); } MessageBox.Show(excel_file + " File Exported Successfully."); wr.Close(); //item report all SqlCommand cmd = new SqlCommand("select Name,Code,(select size from size_master where id=size_id) Size,Quantity,pur_rate as 'Purchase Rate',sale_rate as 'Sale rate',(select catagory from catagory_master where id=catagory_id) Category,Units from item_master order by catagory_id ", con); using Excel = Microsoft.Office.Interop.Excel; using System.Reflection; using System.IO; //login if (dtr.Read() == true) { if (textBox3.Text == dtr["password"].ToString()) { this.Hide(); Startup e1 = new Startup(); e1.Show(); } else { MessageBox.Show("Wrong Password"); } } else { MessageBox.Show("Try Again"); //master report SqlCommand cmd = new SqlCommand("select cast(uni_all as varchar) as 'Voucher No',cast(uni_sale as varchar) as 'Sale Voucher No',cast(uni_pur as varchar) as 'Purchase Voucher no',challan_no as 'Challan No',substring(cast(purchase_date as varchar),0,13) as 'Date',(select name from party_master where id=stock_transaction.party_id) as 'Party Name',(select name+'('+code+')' from item_master where id=stock_transaction.item_id) as 'Item Name(Item Code)',cast((select size_id from item_master where id=stock_transaction.item_id) as varchar) as Size,Quantity,Rate,case type when 'Sale' then debit_amount when 'Purchase' then credit_amount end as 'Item Amount',Units from stock_transaction where purchase_date between (@a) and (@b)", con); cmd.Parameters.AddWithValue("@a", DateTime.Parse(dateTimePicker1.Text)); cmd.Parameters.AddWithValue("@b", DateTime.Parse(dateTimePicker2.Text)); SqlDataAdapter da = new SqlDataAdapter(cmd); DataTable dt = new DataTable(); da.Fill(dt); dataGridView1.DataSource = dt; con.Close(); try { string b = ""; for (int i = 0; i < dataGridView1.Rows.Count - 1; i++) { string a = dataGridView1.Rows[i].Cells[0].Value.ToString(); if (b == a) { b = dataGridView1.Rows[i].Cells[0].Value.ToString(); dataGridView1.Rows[i].Cells[0 to 5].Value = ""; } else { b = dataGridView1.Rows[i].Cells[0].Value.ToString(); } } } catch (Exception ex) { MessageBox.Show(ex.Message); } } private void button2_Click(object sender, EventArgs e) { con.Open();

SqlCommand cmd = new SqlCommand("select cast(uni_all as varchar) as 'Voucher No',cast(uni_sale as varchar) as 'Sale Voucher No',cast(uni_pur as varchar) as 'Purchase Voucher no',challan_no as 'Challan No',substring(cast(purchase_date as varchar),0,13) as 'Date',(select name from party_master where id=stock_transaction.party_id) as 'Party Name',(select name+'('+code+')' from item_master where id=stock_transaction.item_id) as 'Item Name(Item Code)',cast((select size_id from item_master where id=stock_transaction.item_id) as varchar) as Size,Quantity,Rate,case type when 'Sale' then debit_amount when 'Purchase' then credit_amount end as 'Item Amount',Units from stock_transaction where purchase_date between (@a) and (@b) and party_id='" + cmb_pur.SelectedValue + "'", con); cmd.Parameters.AddWithValue("@a", DateTime.Parse(dateTimePicker1.Text)); cmd.Parameters.AddWithValue("@b", DateTime.Parse(dateTimePicker2.Text)); SqlDataAdapter da = new SqlDataAdapter(cmd); dataGridView1.DataSource = dt; con.Close(); try { string b = ""; for (int i = 0; i < dataGridView1.Rows.Count - 1; i++) { string a = dataGridView1.Rows[i].Cells[0].Value.ToString(); if (b == a) { b = dataGridView1.Rows[i].Cells[0].Value.ToString(); dataGridView1.Rows[i].Cells[0 to 5].Value = ""; } else { b = dataGridView1.Rows[i].Cells[0].Value.ToString(); } } } catch (Exception ex) { MessageBox.Show(ex.Message); } } private void button3_Click(object sender, EventArgs e) {SqlCommand cmd = new SqlCommand("select cast(uni_all as varchar) as 'Voucher No',cast(uni_sale as varchar) as 'Sale Voucher No',cast(uni_pur as varchar) as 'Purchase Voucher no',challan_no as 'Challan No',substring(cast(purchase_date as varchar),0,13) as 'Date',(select name from party_master where id=stock_transaction.party_id) as 'Party Name',(select name+'('+code+')' from item_master where id=stock_transaction.item_id) as 'Item Name(Item Code)',cast((select size_id from item_master where id=stock_transaction.item_id) as varchar) as Size,Quantity,Rate,case type when 'Sale' then debit_amount when 'Purchase' then credit_amount end as 'Item Amount',Units from stock_transaction where purchase_date between (@a) and (@b) and party_id='" + cmb_sale.SelectedValue + "'", con); cmd.Parameters.AddWithValue("@a", DateTime.Parse(dateTimePicker1.Text)); cmd.Parameters.AddWithValue("@b", DateTime.Parse(dateTimePicker2.Text)); SqlDataAdapter da = new SqlDataAdapter(cmd); con.Close(); try { string b = ""; for (int i = 0; i < dataGridView1.Rows.Count - 1; i++) { string a = dataGridView1.Rows[i].Cells[0].Value.ToString(); if (b == a) { b = dataGridView1.Rows[i].Cells[0].Value.ToString(); dataGridView1.Rows[i].Cells[0 to5].Value = ""; } else { b = dataGridView1.Rows[i].Cells[0].Value.ToString(); } } } catch (Exception ex) { MessageBox.Show(ex.Message); //purchase party update try

{ SqlCommand cmd4 = new SqlCommand("select name from party_master where name='" + textBox1.Text + "'", con); SqlDataReader dr2 = cmd4.ExecuteReader(); dr2.Read(); if (dr2.HasRows) { dr2.Close(); MessageBox.Show("Name Already Exists"); } else { dr2.Close(); SqlCommand cmd5 = new SqlCommand("update party_master set name='" + textBox1.Text + "' where id='" + comboBox1.SelectedValue.ToString() + "'", con); cmd5.ExecuteNonQuery(); MessageBox.Show("Record Updated"); textBox1.Text = ""; SqlCommand cmd2 = new SqlCommand("select id,name from party_master where type='Purchase Party' order by name", con); SqlDataAdapter da2 = new SqlDataAdapter(cmd2);//do //purchase report view string a1 = txtBox; SqlCommand cmd1 = new SqlCommand("select id as 'Sr.No',substring(cast(purchase_date as varchar),0,13) as 'Payment Date',amount_paid as 'Amount Paid',Description from amount_trans where cast(uni_all as varchar)=@a", con); cmd1.Parameters.AddWithValue("@a", a1); SqlDataAdapter da1 = new SqlDataAdapter(cmd1); con.Close(); try { for (int i = 0; i < dataGridView1.Rows.Count - 1; i++) { dataGridView1.Rows[i].Cells[0].Value = i + 1; } } catch //purchase report SqlCommand cmd = new SqlCommand("select sum(amount_paid),sum(total_amount) from amount_trans where party_id='" + comboBox1.SelectedValue.ToString() + "' and purchase_date between (@a) and (@b) ", con); cmd.Parameters.AddWithValue("@a", DateTime.Parse(txt_first_date.Text)); cmd.Parameters.AddWithValue("@b", DateTime.Parse(txt_second_date.Text)); SqlDataReader dr = cmd.ExecuteReader(); dr.Read(); lbl_amount_paid.Text = dr[0].ToString(); lbl_total_purchase.Text = dr[1].ToString(); dr.Close(); SqlCommand cmd1 = new SqlCommand("select uni_all as 'View',uni_all as 'Voucher No',uni_pur as 'Purchase Voucher No',challan_no as 'Challan No',purchase_date as 'Purchase Date',sum(expense_pur) as Expense',sum(discount_pur) as 'Discount',sum(credit_amount) as 'Item Amount',sum(amount_paid) as 'Amount Paid' from stock_transaction where party_id='" + comboBox1.SelectedValue.ToString() + "' and purchase_date between (@a) and (@b) group by uni_all,uni_pur,challan_no,purchase_date", con); cmd1.Parameters.AddWithValue("@a", DateTime.Parse(txt_first_date.Text)); cmd1.Parameters.AddWithValue("@b", DateTime.Parse(txt_second_date.Text)); SqlDataAdapter da1 = new SqlDataAdapter(cmd1); con.Close(); } private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { Purchase_Report_View obj = new Purchase_Report_View(dataGridView1.CurrentRow.Cells[1].Value.ToString()); obj.Show(); //quantity in hand SqlCommand cmd1 = new SqlCommand("select distinct(units),sum(quantity) as quan from item_master where catagory_id='" + comboBox1.SelectedValue.ToString() + "' group by units", con); SqlDataReader dr = cmd1.ExecuteReader(); int count = 0; while (dr.Read())

if (count == 0) { label2.Text = "Quantity In " + dr[0].ToString(); label3.Text = dr[1].ToString(); }

//recreate item string siz = string.Empty, cat = string.Empty; SqlCommand cmd23 = new SqlCommand("select name,size_id,catagory_id from item_master where code=@code", con); cmd23.Parameters.AddWithValue("@code", txt_item_code.Text); SqlDataReader drt; drt = cmd23.ExecuteReader(); if (drt.Read()) { txt_item_name.Text = drt[0].ToString(); siz = drt[1].ToString(); cat = drt[2].ToString(); } else { drt.Close(); MessageBox.Show("No Data Found"); } con.Close(); if (txt_item_name.Text != string.Empty) { con.Open(); SqlCommand cmd = new SqlCommand("select id,size from size_master where id='" + siz + "'", con); SqlDataAdapter da = new SqlDataAdapter(cmd); DropDownList1.DataSource = ds.Tables[0]; SqlCommand cmd1 = new SqlCommand("select id,catagory from catagory_master where id='" + cat + "'", con); SqlDataAdapter da1 = new SqlDataAdapter(cmd1); //stockin string all = ""; con.Open(); SqlCommand cmds = new SqlCommand("select max(uni_pur)+1 from stock_transaction", con); SqlDataReader drs = cmds.ExecuteReader(); if (drs.Read()) { if (drs.IsDBNull(0)) { lbl_v_no.Text = "1"; } else { lbl_v_no.Text = drs[0].ToString(); } } drs.Close(); SqlCommand cmds2 = new SqlCommand("select max(uni_all)+1 from stock_transaction", con); SqlDataReader drs2 = cmds2.ExecuteReader(); if (drs2.Read()) { if (drs2.IsDBNull(0)) { all = "1"; } else { all = drs2[0].ToString(); } } drs2.Close(); con.Close(); button1_Click(sender, e); con.Open(); int i = 0; SqlTransaction trans; trans = con.BeginTransaction(); SqlCommand cmd = new SqlCommand("insert into stock_transaction (uni_all,uni_pur,challan_no,purchase_date,item_id,quantity,rate,credit_amount,debit_amount,typ e,expense_pur,discount_pur,amount_paid,units) values (@uni_all,@uni,@challan_no,@purchase_date,@item_id,@quantity,@rate,@amount,@debit_amount,@type ,@expense_pur,@discount_pur,@amount_paid,@units)", con); cmd.Transaction = trans; SqlCommand cmd1 = new SqlCommand("select quantity from item_master where id=@id", con); cmd1.Transaction = trans; SqlCommand cmd2 = new SqlCommand("update item_master set quantity=@qt,pur_rate=@rt where id=@idd", con); cmd2.Transaction = trans;

SqlCommand cmd12 = new SqlCommand("insert into amount_trans (uni_all,uni_pur,challan_no,amount_paid,total_amount,type) values (@uni_all,@uni_pur,@challan_no,@amount_paid,@total_amount,@type)", con); cmd12.Transaction = trans; for (int k = 0; k < dataGridView1.Rows.Count - 1; k++) { if (dataGridView1.Rows[k].Cells[4].Value.ToString() != "") { cmd.Parameters.AddWithValue("@uni_all", all); cmd.Parameters.AddWithValue("@uni", lbl_v_no.Text); cmd.Parameters.AddWithValue("@challan_no", txt_challan_no.Text); cmd.Parameters.AddWithValue("@purchase_date", DateTime.Parse(txt_Date.Text)); cmd.Parameters.AddWithValue("@item_id",dataGridView1.Rows[k].Cells[7].Value.ToString()); cmd.Parameters.AddWithValue("@quantity",dataGridView1.Rows[k].Cells[4].Value.ToString()); cmd.Parameters.AddWithValue("@rate",dataGridView1.Rows[k].Cells[5].Value.ToString()); cmd.Parameters.AddWithValue("@amount",dataGridView1.Rows[k].Cells[6].Value.ToString()); cmd.Parameters.AddWithValue("@debit_amount", "0.00"); cmd.Parameters.AddWithValue("@type", "Purchase"); if (i == 0) {cmd.Parameters.AddWithValue("@expense_pur", txt_expense.Text); } else {cmd.Parameters.AddWithValue("@expense_pur", "0"); } if (i == 0) {cmd.Parameters.AddWithValue("@discount_pur", txt_discount.Text);} else {cmd.Parameters.AddWithValue("@discount_pur", "0"); } if (i == 0) {cmd.Parameters.AddWithValue("@amount_paid", txt_amount_paid.Text); } else {cmd.Parameters.AddWithValue("@amount_paid", "0"); } cmd.Parameters.AddWithValue("@units",dataGridView1.Rows[k].Cells[0].Value.ToString()); cmd.ExecuteNonQuery(); cmd.Parameters.Clear(); cmd1.Parameters.AddWithValue("@id", dataGridView1.Rows[k].Cells[7].Value.ToString()); SqlDataReader dr = cmd1.ExecuteReader(); try { dr.Read(); int a = 0; a = Int32.Parse(dr[0].ToString()); int b = (a) + (Int32.Parse(dataGridView1.Rows[k].Cells[4].Value.ToString())); dr.Close(); cmd1.Parameters.Clear(); cmd2.Parameters.AddWithValue("@qt", b.ToString()); cmd2.Parameters.AddWithValue("@rt", dataGridView1.Rows[k].Cells[5].Value.ToString()); cmd2.Parameters.AddWithValue("@idd", dataGridView1.Rows[k].Cells[7].Value.ToString()); cmd2.ExecuteNonQuery(); cmd2.Parameters.Clear(); i++; } catch { } dr.Close(); } } cmd12.Parameters.AddWithValue("@uni_all", all); cmd12.Parameters.AddWithValue("@uni_pur", lbl_v_no.Text); cmd12.Parameters.AddWithValue("@challan_no", txt_challan_no.Text); cmd12.Parameters.AddWithValue("@purchase_date",DateTime.Parse(txt_Date.Text)) cmd12.Parameters.AddWithValue("@party_id", int.Parse(comboBox1.SelectedIndex.ToString())); cmd12.Parameters.AddWithValue("@amount_paid", txt_amount_paid.Text); cmd12.Parameters.AddWithValue("@total_amount", tamount.ToString()); cmd12.Parameters.AddWithValue("@type", "Purchase"); cmd12.ExecuteNonQuery(); try { trans.Commit(); trans.Dispose(); MessageBox.Show("Record Saved...!"); } catch (Exception ex)

{ MessageBox.Show(ex.Message); } con.Close(); txt_challan_no.Text = "";//all rate = 0.00F; SqlCommand cmdss1 = new SqlCommand("select max(uni_pur)+1 from stock_transaction", con); SqlDataReader drss1 = cmdss1.ExecuteReader(); if (drss1.Read()) { if (drss1.IsDBNull(0)) { lbl_v_no.Text = "1"; } else { lbl_v_no.Text = drss1[0].ToString(); } drss1.Close(); con.Close(); dataGridView1.Rows.Clear(); } private void button1_Click(object sender, EventArgs e) { try { rate = 0.00F; for (int k = 0; k < dataGridView1.Rows.Count - 1; k++) { if (dataGridView1.Rows[k].Cells[4].Value.ToString() != "") { quantity = float.Parse(dataGridView1.Rows[k].Cells[4].Value.ToString()); rate = float.Parse(dataGridView1.Rows[k].Cells[5].Value.ToString()); amount = quantity * rate; dataGridView1.Rows[k].Cells[6].Value = amount; amount1 = amount + amount1; } } label10.Text = amount1.ToString(); expen = float.Parse(txt_expense.Text); discount = float.Parse(txt_discount.Text); amount_paid = float.Parse(txt_amount_paid.Text); amount_pending = amount1 + expen - discount - amount_paid; tamount = amount1 + expen - discount; txt_pending_amt.Text = amount_pending.ToString(); } catch (Exception ex) //update purchase rate SqlCommand cmd = new SqlCommand("select code,pur_rate,sale_rate from item_master where id=@code", con); cmd.Parameters.AddWithValue("@code", comboBox1.SelectedValue); SqlDataReader dr = cmd.ExecuteReader(); if (dr.Read()) { textBox1.Text = dr[0].ToString(); textBox2.Text = dr[1].ToString(); textBox3.Text = dr[2].ToString(); //view detail day string a1 = txtBox; SqlCommand cmd1 = new SqlCommand("select sum(total_amount),sum(amount_received),sum(amount_paid) from amount_trans where uni_all='" + a1 + "'", con); SqlDataReader dr = cmd1.ExecuteReader(); dr.Read(); lbl_total_amount.Text = dr[0].ToString(); lbl_amount_received.Text = dr[1].ToString(); lbl_amount_paid.Text = dr[2].ToString(); dr.Close(); SqlCommand cmd = new SqlCommand("select uni_all as 'Voucher No',uni_sale as 'Sale Voucher No',uni_pur as 'Purchase Voucher no',challan_no as 'Challan No',substring(cast(purchase_date as varchar),0,13) as 'Date',(select name from party_master where id=stock_transaction.party_id) as 'Party Name',(select name+'('+code+')' from item_master where id=stock_transaction.item_id) as 'Item Name(Item Code)',cast((select size_id

from item_master where id=stock_transaction.item_id) as varchar) as Size,Quantity,Rate,case type when 'Sale' then debit_amount when 'Purchase' then credit_amount end as 'Item Amount',Units from stock_transaction where uni_all='" + a1 + "'", con); SqlDataAdapter da = new SqlDataAdapter(cmd); dataGridView1.DataSource = dt; con.Close(); con.Open(); for (int i = 0; i < (dataGridView1.Rows.Count - 1); i++) { SqlCommand cmds = new SqlCommand("select size from size_master where id='" + dataGridView1.Rows[i].Cells[7].Value.ToString() + "'", con); SqlDataReader drs = cmds.ExecuteReader(); drs.Read(); dataGridView1.Rows[i].Cells[7].Value = drs[0].ToString(); //view detail sale string txtBox = "", party = ""; float total = 0, amount = 0, paying = 0; try { total = float.Parse(lbl_total_amount.Text); amount = float.Parse(lbl_amount_paid.Text); paying = float.Parse(txt_amount.Text); } catch { total = 0; amount = 0; paying = 0; } if (txt_amount.Text == "" || txt_amount.Text == "0") { MessageBox.Show("please enter Amount"); } else if ((paying + amount) > total) {MessageBox.Show("Amount Entered Is greater than total amount"); } else { SqlCommand cmd = new SqlCommand("insert into amount_trans (uni_all,uni_sale,challan_no,purchase_date,party_id,amount_received,type,description) values(@uni_all,@uni_sale,@challan_no,@purchase_date,@party_id,@amount_received,@type,@descrip tion)", con); cmd.Parameters.AddWithValue("uni_all", lbl_sr_no.Text); cmd.Parameters.AddWithValue("uni_sale", lbl_purchase_voucher.Text); cmd.Parameters.AddWithValue("challan_no", lbl_challan_no.Text); cmd.Parameters.AddWithValue("purchase_date", DateTime.Parse(txt_date.Text)); cmd.Parameters.AddWithValue("party_id", party); cmd.Parameters.AddWithValue("amount_received", txt_amount.Text); cmd.Parameters.AddWithValue("type", "Sale"); cmd.Parameters.AddWithValue("description", txt_dexcription.Text); if (cmd.ExecuteNonQuery() == 1) { lbl_sr_no.Text = ""; lbl_purchase_voucher.Text = ""; lbl_party_name.Text = ""; lbl_challan_no.Text = ""; lbl_amount_paid.Text = ""; txt_amount.Text = ""; lbl_total_amount.Text = ""; txt_dexcription.Text = ""; button1.Enabled = false; MessageBox.Show("Record Saved"); } con.Close(); } } private void view_detail_sale_Load(object sender, EventArgs e) { txt_date.Text = DateTime.Now.ToString("dd/MM/yyyy"); con.Open(); string qu = txtBox; SqlCommand cmd = new SqlCommand("select uni_sale,challan_no,(select name from party_master where id=amount_trans.party_id),sum(total_amount),sum(amount_received),party_id from amount_trans where uni_all='" + qu + "' group by uni_sale,challan_no,party_id", con); SqlDataReader dr = cmd.ExecuteReader(); dr.Read(); lbl_sr_no.Text = qu.ToString(); lbl_purchase_voucher.Text = dr[0].ToString(); lbl_challan_no.Text = dr[1].ToString(); lbl_party_name.Text = dr[2].ToString(); lbl_total_amount.Text = dr[3].ToString(); lbl_amount_paid.Text = dr[4].ToString(); party = dr[5].ToString();

Anda mungkin juga menyukai