Example #1
0
        private void load_data(string JONO)
        {
            DataSet dsHeader = new joborderCRUD().getData(JONO);

            txtCostingNo.Text      = JONO;
            cbDIV.SelectedValue    = dsHeader.Tables[0].Rows[0]["GDIV"].ToString();
            cbTypeID.SelectedValue = dsHeader.Tables[0].Rows[0]["TYPEID"].ToString();
            txtQty.Text            = dsHeader.Tables[0].Rows[0]["QUANTITY"].ToString();
            txtCustomerID.Text     = dsHeader.Tables[0].Rows[0]["CUSTVENDCODE"].ToString();
            txtStyleID.Text        = dsHeader.Tables[0].Rows[0]["ITEMSID"].ToString();
            txtCategoryID.Text     = dsHeader.Tables[0].Rows[0]["CATEGORYID"].ToString();
            dateCreated.Value      = (DateTime)dsHeader.Tables[0].Rows[0]["DATE"];
            txtPOCustomer.Text     = dsHeader.Tables[0].Rows[0]["POCUSTOMER"].ToString();
            txtRemarks.Text        = dsHeader.Tables[0].Rows[0]["REMARKS"].ToString();
            txtWash.Text           = dsHeader.Tables[0].Rows[0]["WASH"].ToString();
            DataSet dsDetail = new joborderdetailCRUD().getData(JONO);

            dtGrid.Rows.Clear();
            for (int i = 0; i < dsDetail.Tables[0].Rows.Count; i++)
            {
                dtGrid.Rows.Add();
                dtGrid.Rows[i].HeaderCell.Value            = "V";
                dtGrid.Rows[i].Cells["hOrderNo"].Value     = dsDetail.Tables[0].Rows[i]["ORDERNO"].ToString();
                dtGrid.Rows[i].Cells["hPOCustomer"].Value  = dsDetail.Tables[0].Rows[i]["POCUSTOMER"].ToString();
                dtGrid.Rows[i].Cells["hColorID"].Value     = dsDetail.Tables[0].Rows[i]["COLORID"].ToString();
                dtGrid.Rows[i].Cells["hSizeID"].Value      = dsDetail.Tables[0].Rows[i]["SIZEID"].ToString();
                dtGrid.Rows[i].Cells["hNoUrut"].Value      = dsDetail.Tables[0].Rows[i]["NOURUT"].ToString();
                dtGrid.Rows[i].Cells["hAllowance"].Value   = dsDetail.Tables[0].Rows[i]["ALLOWANCE"].ToString();
                dtGrid.Rows[i].Cells["hQuantity"].Value    = dsDetail.Tables[0].Rows[i]["QUANTITY"].ToString();
                dtGrid.Rows[i].Cells["hCuttingQty"].Value  = dsDetail.Tables[0].Rows[i]["CUTTINGQTY"].ToString();
                dtGrid.Rows[i].Cells["hDestination"].Value = dsDetail.Tables[0].Rows[i]["DESTINATION"].ToString();
                //dt = dsDetail.Tables[0].Rows[i]["DELIVERY"].;
                dtGrid.Rows[i].Cells["hDelivery"].Value = Convert.ToDateTime(dsDetail.Tables[0].Rows[i]["DELIVERY"]).ToString("dd/MM/yyyy");
            }
        }
Example #2
0
        private void load_color(string JONO)
        {
            DataSet dsColor = new joborderCRUD().getColor(JONO);

            dtColor.Rows.Clear();
            for (int i = 0; i < dsColor.Tables[0].Rows.Count; i++)
            {
                dtColor.Rows.Add();

                dtColor.Rows[i].Cells["hJONO"].Value    = Convert.ToString(dsColor.Tables[0].Rows[i]["JONO"]);
                dtColor.Rows[i].Cells["hStyleID"].Value = Convert.ToString(dsColor.Tables[0].Rows[i]["STYLEID"]);
                txtJONO.Text    = Convert.ToString(dsColor.Tables[0].Rows[i]["ORDERNO"]);
                txtStyleID.Text = Convert.ToString(dsColor.Tables[0].Rows[i]["ITEMSID"]);
                dtColor.Rows[i].Cells["hColorID"].Value = Convert.ToString(dsColor.Tables[0].Rows[i]["COLORID"]);
                if (!DBNull.Value.Equals(dsColor.Tables[0].Rows[i]["STARTDATE"]))
                {
                    dtColor.Rows[i].Cells["hStart"].Value = Convert.ToDateTime(dsColor.Tables[0].Rows[i]["STARTDATE"]).ToString(GlobalVariables.GFormat);
                }
                if (!DBNull.Value.Equals(dsColor.Tables[0].Rows[i]["CLOSEDATE"]))
                {
                    dtColor.Rows[i].Cells["hClose"].Value = Convert.ToDateTime(dsColor.Tables[0].Rows[i]["CLOSEDATE"]).ToString(GlobalVariables.GFormat);
                }
                if (!DBNull.Value.Equals(dsColor.Tables[0].Rows[i]["DELIVERYDATE"]))
                {
                    dtColor.Rows[i].Cells["hDelivery"].Value = Convert.ToDateTime(dsColor.Tables[0].Rows[i]["DELIVERYDATE"]).ToString(GlobalVariables.GFormat);
                }
            }
        }
Example #3
0
        private void Print_Click(object sender, EventArgs e)
        {
            DataSet data = new joborderCRUD().prJobOrder(txtCostingNo.Text);

            Application.DoEvents();
            data.WriteXml("C:\\MyGarmentReport\\joborder.xml", XmlWriteMode.WriteSchema);
            Form f = new PrintJO();

            f.Show();
        }
Example #4
0
        private void RecordTSB_Click(object sender, EventArgs e)
        {
            //k.ORDERNO=txtCostingNo.Text;
            // k.TYPEID=txtTypeID.Text;
            //k.APPROVE= txtStatus.Text;
            //k.OFFICER=txtOfficer.Text;
            //k.CUSTVENDCODE=txtCustomer.Text;
            //k.APPROVE= Convert.ToInt32(cbApprove.Text);
            DataSet data = new joborderCRUD().getData(txtCostingNo.Text, txtStyleID.Text, txtPOCustomer.Text, txtOfficer.Text, txtCustomer.Text);

            DtGrid.DataSource = data;
            DtGrid.DataMember = "tbljoborder";
        }
Example #5
0
        private void load_size(string JONO)
        {
            DataSet dsSize = new joborderCRUD().getSize(JONO);

            dtSize.Rows.Clear();
            for (int i = 0; i < dsSize.Tables[0].Rows.Count; i++)
            {
                dtSize.Rows.Add();
                dtSize.Rows[i].Cells["dStyleID"].Value = Convert.ToString(dsSize.Tables[0].Rows[i]["STYLEID"]);
                dtSize.Rows[i].Cells["dSizeID"].Value  = Convert.ToString(dsSize.Tables[0].Rows[i]["SIZEID"]);
                //dtSize.Rows[i].Cells["dNoUrut"].Value = Convert.ToString(dsSize.Tables[0].Rows[i]["NOURUT"]);
                dtSize.Rows[i].Cells["dNoUrut"].Value  = i;
                dtSize.Rows[i].Cells["dQtyPlan"].Value = Convert.ToString(dsSize.Tables[0].Rows[i]["CUTTINGQTY"]);
                dtSize.Rows[i].Cells["dRatio"].Value   = Convert.ToString(dsSize.Tables[0].Rows[i]["RATIO"]);
            }
        }
Example #6
0
        private void button1_Click(object sender, EventArgs e)
        {
            frmjoborderSearch f = new frmjoborderSearch();

            f.AddItemCallback = new frmjoborderSearch.AddCostingDelegate(this.SetCostingCallBack);
            f.ShowDialog();

            if (GStrCode != "")
            {
                DataSet dsHeader = new joborderCRUD().getGarment(GStrCode);
                cbDIV.SelectedValue = dsHeader.Tables[0].Rows[0]["GDIV"].ToString();
                txtCustomerID.Text  = dsHeader.Tables[0].Rows[0]["CUSTVENDCODE"].ToString();

                DataSet dsSupplier = new mcustvendCRUD().getData(txtCustomerID.Text, "", "");
                if (dsSupplier.Tables[0].Rows.Count > 0)
                {
                    txtCustomerDesc.Text = dsSupplier.Tables[0].Rows[0]["NAME"].ToString();
                    txtAddress.Text      = dsSupplier.Tables[0].Rows[0]["ADDRESS"].ToString();
                }
                //isi detail
                DataSet dsDetail = new joborderdetailCRUD().getData(GStrCode);
                // var index = dtGrid.Rows.Add();
                dtGrid.Rows.Clear();
                for (int i = 0; i < dsDetail.Tables[0].Rows.Count; i++)
                {
                    dtGrid.Rows.Add();
                    dtGrid.Rows[i].HeaderCell.Value            = "#";
                    dtGrid.Rows[i].Cells["hID"].Value          = i;//dsDetail.Tables[0].Rows[i]["ID"].ToString();
                    dtGrid.Rows[i].Cells["hItemsID"].Value     = Convert.ToString(dsHeader.Tables[0].Rows[0]["ITEMSID"]);
                    dtGrid.Rows[i].Cells["hDescription"].Value = Convert.ToString(dsHeader.Tables[0].Rows[0]["ITEMSID"]);
                    // dtGrid.Rows[i].Cells["hJenis"].Value = dsDetail.Tables[0].Rows[i]["JENIS"].ToString();
                    dtGrid.Rows[i].Cells["hColorID"].Value     = Convert.ToString(dsDetail.Tables[0].Rows[i]["COLORID"]);
                    dtGrid.Rows[i].Cells["hSizeID"].Value      = Convert.ToString(dsDetail.Tables[0].Rows[i]["SIZEID"]);
                    dtGrid.Rows[i].Cells["hGrade"].Value       = "A";
                    dtGrid.Rows[i].Cells["hStyleID"].Value     = Convert.ToString(dsHeader.Tables[0].Rows[0]["ITEMSID"]);
                    dtGrid.Rows[i].Cells["hQuantity"].Value    = Convert.ToString(dsDetail.Tables[0].Rows[i]["QUANTITY"]);
                    dtGrid.Rows[i].Cells["hUOM"].Value         = "PCS";
                    dtGrid.Rows[i].Cells["hConvert"].Value     = 1;
                    dtGrid.Rows[i].Cells["hQtyPurchase"].Value = Convert.ToString(dsDetail.Tables[0].Rows[i]["QUANTITY"]);
                    dtGrid.Rows[i].Cells["hUOMPurchase"].Value = "PCS";
                }
                SimpanTSB.Enabled = true;
                UbahTSB.Enabled   = false;
                dtGrid.Enabled    = true;
            }
        }